Like surely it’s easier to run a railway network when compared to the insane complexity to safely operate an airport and all the work that goes into plane maintenance and pilot training and so on.
The upshot is that trains are a lot costlier than most believe think and most railway routes require state subsidies (with goods transport usually being an exception), whereas air traffic works so well it can be taxed heavily.
In Germany (and also e.g. Switzerland), long-distance trains are expected to run either at cost (or make a profit). Short-distance trains (regional transport) are usually subsidized.
Planes are faster, and there is actual competition keeping prices down. There is no competition on railroads, no accountability, no nothing. More importantly, railroads have to be managed centrally to work. And this makes them overwhelmingly complex, resulting in an ever-growing bureaucracy.
Air travel is decentralized, and while individual airports (cue: BER) can get screwed up, it doesn't cascade through the whole system.
We just need to add a bit of carbon pricing to reflect the true price of flights.
Airlines are subject to market competition since any competitor around the globe can spot a poorly run route and buy their planes into those slots. If they can execute more efficiently than you, they can afford to lower prices (or increase the level of service) more than you, and thus put you out of business.
Trains do not work this way. No amount of investment can overcome the cushy institutional-rot, laziness, and demotivation that inevitably results from being a monopoly, as most train routes are not subject to competitive forces due to the real world constraints of the infrastructure needed.
That said personally I much prefer the mostly fixed pricing (and no reservation required) of swiss network than the dynamic one of other countries.