Nissan Pathfinder A/C Question

Are the A/C & heater supposed to work when the car is parked? I drive a 2005 Nissan Pathfinder. I’m not sure if it’s been this way the whole time I’ve owned the car, but I noticed last winter that the heater begin blowing cold air if I parked the car and left it running for a while. Also, when I park the car in the summer, the A/C doesn’t blow as cold either.