It's less a matter of cost and more of its situation: orbiting, not flying, through vacuum, not air, with careful attention to stabilization and vibration elimination.
It costs a lot of money to get that large of an object into that ideal location, though. In the context of my original comment, "cost" could be seen as a proxy for "difficulty" of any kind. Perhaps it was too short and a bit flippant, but it seemed appropriate to respond in kind to the original comparison between Hubble and an airplane.
There are also aircraft-based observatories. Principally for exploring specific wavelengths of light absorbed in the lower atmosphere. And, incidentally, rather less expensive than orbital observatories.
Good guidance, getting above turbulence, and having specific compensation for movement/motion all helps.
My points stand: the characteristics of Hubble are not directly related to cost, and attributing the distinction to that alone is a poor explanation.