I never knew that either. I just assumed singing was recorded the same way dialogue was. Even today I'm not sure I understand exactly how it's done. With musical numbers do the actors just mime the lyrics or do they actually sing but the singing is not recorded until it's dubbed in later?