There used to be a hotel near the airport, but it closed a long time ago
There used to be a hotel near the airport, but it was closed a long time ago
In English Grammar in Use, the first one is used. Why?
Both are grammatical. The first is much more idiomatic.
I haven't got a definite answer for why it is preferred; but I think it is because it doesn't invite the question "Who closed it", where the second does. You would use the second if you wanted to emphasise that somebody closed it.