All WebParts are parented to the WebPartManager, and all WebParts are required to have an ID.
For a static WebPart (a WebPart in the ZoneTemplate of a WebPartZone), you must specify the ID in the persistence format, so the UniqueID of the WebPart is the ID of the WebPartManager, plus the ID of the WebPart itself.
When you add a dynamic WebPart, we generate a random ID for the WebPart. However, this ID will stay the same as long as the WebPart is on the page. We need the ID to stay constant, since the WebPart ID is used as the key for storing Personalization data.
http://blogs.msdn.com/mharderThis posting is provided "AS IS" with no warranties, and confers no rights.