In Germany, jet fuel is untaxed, whereas train companies have to pay tax on electricity, in particular renewable energy. Also, VAT is handled differently: if you buy a flight from Germany to another country, only a portion of what you paid for your plane ticket is taxed at German VAT rate, but for train tickets, 100% of the ticket price is taxed with the German VAT rate. These are several factors that make it quite a bit harder for the railway to compete with short-distance flights.