It's about the angles that the spokes take on their way to the rim. Ideally you'd like the spokes to be at a tangent as they leave the hub and radial as they enter the rim but you can't have both. As a general rule 3 cross usually works best with 32 or 36 spokes and 2 cross works better with 24 or 28 spokes.