Why do the jet turbines spin while the engines are turned off?
After shutting down they still have momentum. Or like you said, because of Windmilling - freely turning when the wind impacts the compressor blades.

The APU can, but more often than not doesn't, rotate the engines (overly simplified, not to go into unrelated details).