Nah, it's mostly just for money. And like all other systems there are advantages, disadvantages and circumventions.
Long time ago we had this huge parking building. They charged around $3 per hour, $10 for a whole day and $15 for a new ticket when you accidentaly lost your original. Didn't take long for people to figure out what to do if you wanted your car parked relatively safely for more than 1 day :)
My old apartment complex had run out of parking spaces, they then required everyone to register their vehicles or face towing. Around 20 cars were towed because the owners no longer even lived in the complex, or were just using it like a spare garage.
In downtown Orlando you see all the people who live "van life" or out of their car, they all park around 7pm when parking becomes free and then leave by 9am when it is pay for again.
Thankfully with the 3 hour limit, they are forced to move around, even if its just to other spots, its less convenient than other options.
or is it just to prevent people from parking forever