Well it might be a possible wiring fault but I can't see it from what you describe.
I have heard fans running in unattended locked cars in the past - obviously not controlled directly by the ignition switch - and the fan circuit runs on because the engine's still warm.
Odd that the fan starts up immediately - the switch for it must be a water temperature thermostat somewhere on the engine/cooling water system flow. If this is open i.e. engine cold then the fan can't possibly run unless there's a very weird wiring fault - discover where this switch/thermostat is and when the fault happens just pull a wire from it - if the fan then stops it suggests a bizaare fault with the thermostat - if the fan continues to run it suggests an even more bizaare fault with the car's wiring.
Good luck...
Peccavi
December 2009