A check of the Dubrovnik Tourist Board website confirms that adults are charged 200 kuna, but anyone under 18 or a student is only charged 50 kuna. Reduced or zero fees are charged to tour guides, journalists and many other categories. Local schools and clubs are not charged. Compare this to any European major gallery and it is similar. The walls and towers (Lovrenac costs 50 kuna to visit) are a massive complex that protected Ragusa for centuries. It had a trading agreement with Rovinj and other cities before 1200. As for the quality and price of food and drink in a tourist town flooded by day tourists, consider the logistics and limits that imposes. And if you only have a tourist economy left, wouldn't you charge what the rich visitors will pay? Try Croatia in shoulder season if possible.
By the way, seniors are offered big discounts on the bus network, worth asking for. Show ID at the ticket office to get this. Croatians measure age by birth year, so write down 1952 or whatever on the piece of paper you slide int with your bus date and time. It helps.