Classical justification of the Stern-Gerlach experiment