There are two important interactions in magnetic materials: the dipolar interaction and the exchange interaction.
The dipolar interaction corresponds to the magnetic fields from the Maxwell equations. This field is dominant on the macroscopic scale. Therefore, if we look to the macroscopic bar magnets, they nicely follow the behavior of the magnetic field lines and thus will orient antiparallel when you place them next to each other.
At the level of the atoms itself, the exchange interaction is dominant. This interaction describes the coupling between neighboring spins and thus determines the orientation of the atomic dipoles in the crystal. It is based on the Pauli-exclusion principle and thus has a quantum mechanical origin. There is a constant, the exchange constant, describing this interaction. When the exchange constant is positive, parallel alignment of the atomic dipoles is energetically more favorable, and, in this case, we talk about ferromagnets. Ferromagnets are more common (Fe, Ni, Co) and therefore we tend to think first to the ferromagnetic ordering. When the exchange constant is negative, antiparallel alignment of the atomic dipoles is favorable and here we talk about ferrimagnets or antiferromagnets.
An example which illustrates the competition between the dipolar and exchange interaction in ferromagnets is the domain formation. The dipolar interaction wants to form as much as possible domains with opposite magnetic orientations. On the other hand, the exchange interaction (in a ferromagnet) prefers to form 1 big domain which has everywhere the same orientation. At a certain length scale, both interactions are comparable to each other which determines the size of the magnetic domains. Inside the domain (dimensions smaller than the domain size), the orientation is everywhere uniform and dominated by the exchange interaction. Over several domains (dimensions larger than the domain size), the interaction is determined by the dipolar interaction.