The initial search efforts did indeed take place in the South China Sea.
Interest moved to the Bay of Bengal after new evidence from military radar surveillance showed that the aircraft had turned west across the Malaysian Peninsula after contact was lost over the South China Sea. It took some time for this evidence to surface because the performance and capabilities of military radar systems are usually closely kept secrets -- presumably a lot of people in the military hierarchies had to sign off on releasing it.
Later still, additional analysis pointed to an area in the south Indian Ocean. It turned out that a single communication system aboard the plane had kept working for many hours after the South China Sea loss-of-contact. This is a satellite-based system that is usually used for routine maintenance messages, not for navigation or accident investigation. It took many weeks to get from "the plane was still alive for many hours" to "it went to the south Indian Ocean", through clever and painstaking analysis of data that the satellite company had originally collected for the purpose of tracking the health and performance of the satellite itself, rather than as a way to locate planes.
Part of the information used was how long it took for the aircraft to respond to the satellite each time it checked in (which gave the distance from the satellite to the aircraft at that time), plus minor variations in the RF frequency the aircraft responded at (which combines to give some information about its heading and velocity). The current search areas are the result of that information combined with "reasonable assumptions" about which speed the aircraft was cruising at during this period.
For some time the best analysis of the satellite data could only say that the last contact must have been either in the south Indian Ocean or somewhere around Afghanistan, but the "northern corridor" was later excluded by more detailed analysis. (It was never considered very likely, since it was much harder to imagine how the plane could stay undetected over land, where it ought to have been in view of many primary radar systems than over the ocean, outside of direct radar coverage).