To imagine what is happening in the Stern-Gerlach experiment from a classical point of view, consider what would happen if you threw a bar magnet into a region with a magnetic field.
The north end of the magnet would be attracted one way in the field, while the south end would be attracted in the other. If the field were uniform, these two forces would cancel. The effect of a uniform magnetic field would be to apply a torque on the bar magnet, but it wouldn't cause it's center of mass to change.
On the other hand, if the magnetic field were not uniform, then the two ends of the bar magnet would experience different strength magnetic fields, and it would be possible for the magnet to have its center of mass moved in one direction. Of course if the magnet were reversed, the force would reverse too, so there you have it, a non uniform magnetic field will spread magnets out while a uniform magnetic field does not.
If you happen to find a magnetic monopole, well it would be attracted to one end or the other of even a uniform magnetic field. But we know that these things are hard to get, so the best we can do is to use a magnetic "dipole". And as illustrated above, a dipole can only be influenced, in terms of an overall force acting on the center of mass, when the dipole is placed in a non uniform magnetic field.
The quantum effect is similar. Hope this helps your intuition on the problem. The Stern-Gerlach experiment is very very important to an understanding of quantum physics.
Carl