Maybe it was a historic thing that both airlines and passengers got used to it, but there are other reasons in my opinion:
Competition. If I have the option between two airlines with similar prices, I will pick the one that offers more stuff. As a person who works for an airline, I can tell you that many full-service airlines have huge, dedicated teams just for the food and beverage because airlines believe that it's important. In fact, almost all the bloggers who evaluate airlines consider the food to be one of the most important aspects.
You can easily bring food onboard buses and trains as the security measures are much relaxed, you can bring your own home cooked meals in some container, that's not the case for airplanes due to the high security measures and possibly luggage limitations, with the exception of some restaurants in the duty free where you can pick up some food from a few options before you board.
Long haul bus rides usually have stops, usually in places where you can buy food. That's not the case for flights.
Connecting flights: as many airlines nowadays tend to have hubs where they offer transit flights that takes you from the far east to the far west with crazy connections times. Passengers exceptexpect to be fed, had their luggage delivered to the last destination, and even more.