The reason is fairly simple - when you create an object through an association where the parent object is not yet saved, its associated foreign key can't have a value, because the associated record isn't saved yet. By means of example:
# Registration announcement is not saved at this point, so it has no ID.
@a1 = @e1.build_registration_announcement(:announcement => "Please bring a favorite baked dish.")
# Registration is built without a registration_announcement_id, as @a1 has no ID to pass on.
@a1.registrations.build(:contact_email => "[email protected]", :adults => 1)
#registration doesn't know about its unsaved registration_announcement parent
# Registration announcement is created and saved. ID exists.
@a2 = @e2.create_registration_announcement(:announcement => "Fall house cleaning!")
# Since the Registration announcement has an ID, registration_announcement_id is set on the built associated registration
@a2.registrations.build(:contact_email => "[email protected]", :adults => 5)
#registration knows about its saved registration_announcement parent
It's a little unexpected, since you might logically expect Rails to keep the object association around and then assign the association foreign key at save-time, but it doesn't seem to work that way.