Being coastal just means you have prevailing winds - if geography is working against you (barrier mountains or a basin) then you will have a pollution issue.
LA has the second-lowest carbon emissions in the country, after NYC. The problem is that it sits at the foothills of mountains which block the wind and prevent the pollution from blowing away.
NYC, on the other hand, has very clean air because it has incredibly low pollution output per capita and the geography favors its quick removal.
(In fact, most of the pollution in NYC air actually comes from across the Hudson - pollutants emitted by Newark and Elizabeth and which pass over NYC as they disseminate.)
https://en.wikipedia.org/wiki/List_of_power_stations_in_New_...