How does Apple's free apps program work? Apple recently announced that iLife and iWork suites are free with new Macs and iOS devices, but how does it work? Is it preinstalled? What happens if I wipe out the system—will it still be free in the App Store? Does it associate the apps with purchases on a single Apple ID?
Whenever buying anything from Apple in the recent past that came with software, it's been linked to my Apple ID, so perpetually available in the App Store.

Eg. buying a Macbook just as Mountain Lion came out, it shipped without it, but was available for free from the store with it when I logged in with my Apple ID.