Why did it take so long before anyone realized the plane was missing?

It didn't. Malaysia's acting transport minister, Hishammuddin Hussein, has confirmed that the plane ceased communicating with ground control about 40 minutes into its flight to Beijing, but this information was not made public for many hours.

Malaysia has faced accusations of not sharing all of its information or suspicions about the plane's final movements.