Because of Condensation of water vapor in the exhaust gas
This needs the very cold, very dry air at higher altitudes between 6000m and 12000m. These trails can form condensation cores for humidity already present, so the trail grows over time and stays in place for hours. They are called condensation trails or "contrails".