Ships are not usually found in the middle of cities.
Recent state and federal regulations have made this less a problem.
there was a push to improve shore-power options for these ships a while back, but i'm not sure where it went. probably deemed to costly or intrusive by the shippers.
http://www.portoflosangeles.org/environment/alt_maritime_pow...
There has been push back from cargo shippers, but cruise ships are using it. The port of LA has been pretty forward-looking about improving operations efficiency.