From a tourism perspective, free national museums function as loss leaders: they draw visitors into a city, who then spend on hotels, restaurants and transport. The economic return to the wider destination often dwarfs any revenue a ticket might raise for the institution itself.
That said, local taxpayers sometimes resent subsidising attractions used heavily by overseas tourists. A dual pricing model — free or discounted for residents, full price for non-residents — is used successfully in several countries and deserves wider consideration. Universal free entry is not the only fair arrangement.