ZEV credits are part of the regulatory environment just like tariffs, import duties and taxes are part of the regulatory environment. Tariffs, import duties and taxes decrease income, ZEV and other regulatory credits increase income.
Neither side should be excluded.
Tesla typically defers more expenses than they normally should, such as conservatively estimated and provisioned warranty costs, or resale guarantee costs.
It's not really possible to 'defer' expenses - either an expense applies to this reporting period or not, but they defer some revenue from every unit sold which reduces income.
Note that most of these questions were already answered in the past: yes, NVidia Pascal chip is enough for EAP, and yes, all FSD customers on an AP 2.0 or later hardware platform get the new HW3 hardware for free. (Not truly for free: they already paid for it by paying for the FSD option.)