I know it seems expensive, but consider Apple’s costs. Rent Moscone center for a week. The actual show is 5 days, but it takes additional days to set up and tear down. Pay union wages for electricians, movers, security, food service workers, video crews, etc. Rent stages, video, lighting, commercial grade WiFi, and technicians to install and run it. Provide 6000 meals a day (5000 developers plus Apple employees), plus snacks and amenities. Choreograph a party with a band, food and drinks, additional stage, lighting, sound and security, at another venue.
Ex-Apple employee David Shayer answers on Quora. I wouldn’t be surprised if they actually make a loss on the whole week and the ticket cost is used to ensure only committed developers attend.