I'm in no way defending the pedophile (alleged) Jackson, nor this, this, this whatever you want to call it - spectacle. But, in addition to what you've mentioned, Jackson's estate tax will more than cover, probably 20 or 30 times over, the cost of this funeral.
Plus, the additional sales tax from Jackson memorabilia, if it's anything like Elvis, will be in the millions each year for dozens and dozens of years. Regardless of what initial capital expense the city, county and state incurred, they'll will make it up or perhaps already have made it up.
If it's anything like Elvis' estate, the profits will be at least $50 million a year.