Why do jet engines take a long time to throttle down? Apparently jet engines can take several seconds, up to ten or fifteen seconds, to go from full power to idle.

Why is this? Can't a simple fuel valve shut off fuel flow? Or reduce it to whatever flow rate corresponds to idle? Either of these, if done with a valve, should happen almost instantly as far as I can tell.

This would surely cut thrust, regardless if the engine still spins for a while. Is there something dangerous about this idea? To me it seems like a fuel valve can close and open again as many times as it wants.

Note: I'm interested in turbojets and turbofans. And I care about throttling down only.
The simple answer is rotational inertia, once you get a heavy mass spinning fast that heavy mass will have a tendency to continue spinning fast unless something else is acted upon the object. Piston engines have a great deal of friction between the piston walls and pistons (how they hold the explosion in) this helps them slow down faster than a jet in which the turbine is made to easily handle this thus the joints are very well made and very free moving. While cutting fuel will keep the engine from continuing to generate thrust the turbine will continue to spin until a force causes it to stop (drag and friction really).