This is due to the Pauli Exclusion Principle, which states that no two electrons in an atom can have the same set of four quantum numbers. Since one of these numbers is spin, which can be either spin up (+1/2) or spin down (-1/2), an orbital can only hold two electrons with opposite spins.