It's called windmilling. There is no reason to prevent it in the short term, which is why it isn't done.
If an aircraft is parked for any extended period of time, engine covers are usually installed which in addition to preventing foreign objects, dust, moisture, birds etc. from entering the engine also prevents windmilling.