No, the money doesn't have to go anywhere. Nor does it have to come from anywhere when everything goes up at once. Because there is no money involved. It's sort of like asking "where do the pounds go when I lose weight?"
You are conflating using "dollars" when used as a unit to measure the value something, with "dollars" as an asset in the economy when used to conduct trade. This confusion is easy to make (and widespread) because we use the same word for both things.
The vast majority of wealth in an economy is not in monetary form. It's in hard and soft assets: land, buildings, cars/trucks, factories, raw materials, home appliances, copyrights, patents, film libraries, etc. The economic value of all those things is just measured in dollars.
You are conflating using "dollars" when used as a unit to measure the value something, with "dollars" as an asset in the economy when used to conduct trade. This confusion is easy to make (and widespread) because we use the same word for both things.
The vast majority of wealth in an economy is not in monetary form. It's in hard and soft assets: land, buildings, cars/trucks, factories, raw materials, home appliances, copyrights, patents, film libraries, etc. The economic value of all those things is just measured in dollars.