Though there are some disagreeable things in Venice, there is nothing so disagreeable as the visitors. -
Henry James, 1882
Nobody goes there anymore. It's too crowded. - Yogi Berra
Nearly 2 million visitors a year arrive by cruise ship. They don't stay in local accommodations and thus pay a visitor tax. They also don't usually eat meals in the city, they go back to the ship to eat food they've already paid for.
I think this is a half-hearted attempt to generate some revenue from those who use the infrastructure but pay little or nothing otherwise. I don't know the docking fees cruise ships pay, but I doubt it covers the cost, especially if you factor in the erosion and other environmental damage the cruise ships cause.
The effort is half-hearted because of pressure from those who profit from the cruise ships docking, including thousands of workers who have jobs from the industry.
Tourism in general and cruise ships tourism specifically has exploded recently. Fortunately, there are ways to avoid the crowds and have a wonderful experience.
For some insight on the problem, see this article.