It doesn't, necessarily.
Racking usually goes hand-in-hand with secondarying, which most people do over a longer time than primary. So, the racking does nothing, but the longer your brew sits undisturbed, the clearer it gets as the yeast settles to the bottom.
Also, many people will rack to secondary in order to lager, which will allow even more yeast to settle out as they become cold and go dormant. Ales also benefit from cold storage--or even just a cold crash the night before bottling to settle out yeast and clear the brew.
Hope this helps.