Pauli's exclusion principle is a consequence of electrons being indistinguishable fermions. Fundamental particles are indistinguishable in that two of the same type differ only in a few properties but otherwise behave identically (compare that say to two apples - they are always in principle distinguishable because they differ in so many ways).
Fermions exhibit an associated statistical property when you have a collection of the otherwise indistinguishable particles. The statistical property follows from how the wavefunction of the collection behaves under symmetry (exchange) operations. You have two choices when you swap particles in such a wavefunction: retain the sign or switch signs. That is one fundamental distinguishing property between fermions and bosons (all particles can be classified as one or the other). It happens that nature allows both cases. We chose to call one fermions (to honor Enrico Fermi who co-discovered them), and the particles we call electrons are fermions (you can look into the details of the Standard Model to work out exactly how changes to the properties of the electron would change the universe). Fermions have half-integer values of the spin quantum number. Bosons have integer values. If you have multiple indistinguishable fermions, the QM wavefunction changes sign (is antisymmetric) under exchange of any two of the particles. For the exchange to alter the sign the two exchanged fermions must differ in some property, making the wavefunction antisymmetric, for instance if intrinsic angular momenta (spins) have opposing quantization (quantum numbers $\pm \frac12$).
The consequence of this is explained well in the Wikipedia
If two fermions were in the same state (for example the same orbital with the same spin in the same atom), interchanging them would change nothing and the total wave function would be unchanged. The only way the total wave function can both change sign as required for fermions and also remain unchanged is that this function must be zero everywhere, which means that the state cannot exist. This reasoning does not apply to bosons because the sign does not change.