wheels rotating in wheel wells
The reason why brakes are applied before the wheels are retracted is because a spinning disc (like a wheel) causes gyroscopic forces similar to that which keeps your bicycle upright. If the wheels are rotated for retraction, these forces can cause the undercarriage to shear off - not a pleasant thought.
One might think that these forces will not be large, but all those 747 wheels are quite large and heavy, causing substantial forces.