Joule heating happens every time when the conduction electrons transfer kinetic energy to the conductor's atoms through collisions, causing these conductor's atoms to increase their kinetic and vibrational energy which manifests as heat. Then, why wouldn't it happen when no current is flowing through the conductor? When there is no current, the electrons are still moving randomly at a speed of $\mathrm{~10^5\ m/s}$, but at a zero average velocity.
Then, why don't these electrons collide with the atomic ions making up the system and transfer energy to them causing them to heat up even when no net current is flowing?