Who invented the modern museum? Why?
They were originally private rooms where people would show off their collections of this and that.
The first public museums in the world opened in Europe during the 18th century and the Age of Enlightenment (Wikipedia)
Here’s one of the first in the United States:
The precursors to museums were “Cabinets of Curiosities”. I always liked the German word for them, “Wunderkammer”. As qpw3141 notes, they were owned by wealthy individuals who wanted to show off their rare objects (acquired at great expense, naturally.)
And Here’s an even earlier one in Engerland.