The Trevi was rebuilt in its current Baroque form in 1762, but the water comes from the ancient Aqua Virgo aqueduct, which has been running since 19 BC. Augustus built the aqueducts for public health; Baroque Rome turned them into theater. The coin-throwing tradition generates roughly €1.5 million a year, which the city donates to a food bank.
Jebulon, CC0, via Wikimedia Commons