It does not make sense that the PA refineries are losing money, while the gulf coast can sustain them.”
Closing down of small or obsolete refineries is a trend that has been consistent since the 1970’s. I don't know the specifics on these exact refineries but generally what causes the breaking point is an economy of scale that favors larger refineries for lowest operation cost and greatest profitability that allows sufficient capital investment for modernization.
I guess the northern refineries have unions and stricter environmental laws to contend with. Yes, things have changed since the 70's. Many jobs have been lost to new technology, as well.