Have you ever flown in a commercial airplane and noticed that first class seats are wider than peasant class, and there are fewer of them in a row? Of course you have. Have you noticed they are always in the front of the plane? This too is obvious, even if you never thought about it. Why are they in the front of the plane? Not so the occupants will die sooner in the case of nose-dive.
In airplanes, the front of the plane is narrower than the middle of the place because of aerodynamics.
I posit these are not unrelated. With less width at the front, airlines would have to either make the seats narrower or have fewer of them per row. But since seats are discrete, and there is a minimum width (even if it doesn’t feel like it), they go with fewer seats. But the plane isn’t so much narrower that you lose exactly one or two seat. Instead you lose part of a seat and can make the other seats wider. And if you make the seats wider, you can charge more. Hence first class is in front of the plane.
First class was one of many logics copied by airlines from the railroads. On trains, my impression (though I am not sure this is a universal rule) is first class is usually on the front or back end of the train (since trains are more easily reversible than planes), though aerodynamics has less to do with it than a reduction in the number of passengers walking through the cabin. On ships, the first class equivalent or staterooms will tend to be above the waterline, so that passengers have a better view, and prices will tend to rise with elevation, and probably towards the front and back.