That's what taxis/ubers are for. It's not economically viable in every City to have public transport running empty all night just for a few people who like to party yet live far away from the party scene.
It's not really economically viable to take a taxi to your night-shift warehouse job. That is around 70% of your daily wage going towards transportation.
How many people are doing nightshifts as part of the total employed population who mostly do day shifts?
Unfortunately the same economies of scale apply to them as well. You can't have city wide public transport run 24/7 because a very small amount of the workforce works during the night.
And night shifts tend to be set in order to overlap with public transport schedules (10pm-6am) so that's not such a big problem.
Technically everything is possible, you can even fly people to commute to the space station, the questions is why some places consider night routes to be economically viable and some not, but that doesn't change the fact that public transportation night routes are a loss maker for the company.
I guess it depends on how much the local government is willing to subsidize public transport, since otherwise daily price tickets will have to go up for all travelers to subsidize the few night travelers.
Here in Austria we also don't have night routes during the week in cities that are not Vienna even if some people still need to travel during the night, but the transport companies can't run at a loss, so it's either the state pays for it(via higher taxes for everyone) or the day travelers will pay more for it, there's no free lunch here, someone still needs to pay for the unprofitable night service which is a loss maker. How Santa Monia does it I don't know but it doesn't change the fact the night services are loss makers everywhere and public transportation in general is only profitable at massive scale often relying on public subsidies to stay afloat even in the US.
Also public transportation costs are not apples to apples comparable between countries. Maybe it works in the Santa Monica, since fuel is dirt cheap or maybe they subsidize a lot and maybe they can pay bus drivers peanuts or something I don't know, but here in Austria running public transport is very expensive (unions, pensions, strict work hours, great workers benefits, infrastructure, maintenance, running costs, etc), especially in cities other than Vienna, so the routes are pretty shit and night routes non existent in order to not loose money, so most people rely on private cars or taxis for commutes out of hours. Improving that would come at increased costs and ticket prices are already maxed out and so are taxes.