> I don't understand why Chevron, the evil oil company, was defending the EPA's authority
Because in 1981, Reagan was sworn in and the EPA began deregulating. NRDC sued to block the EPA’s then-updated interpretation of the word “source” in the Clean Air Act, which provided companies a way to bypass certain regulations. Chevron liked this, and liked the direction Reagan was taking the EPA, so it suited them to argue for deference to the agency’s interpretations.
Now that the administrative agencies have been adopting more aggressively left-wing interpretations, it suits the right wing to remove that deference.
Presumably, the Supreme Court will just change its mind again if Republicans hold government again and it becomes expedient for them.