Because US ports are run by private companies and not the federal government. The "Port of Long Beach" run by the local port authority is primarily a landlord. It's called capitalism.
I think the Port of Virginia is run by the State of Virginia and actually did pretty well. East Coast longshoreman unions are less insane than those on the West Coast.