Why does a rectangular wing stall first at the root?
The tip vortex (caused by higher pressure air from below the tip moving into the low pressure region on top by rolling around the tip) reduces the effective angle of attack at the tip and keeps the boundary layer attached longer as the stall progresses.  The tip vortex has this effect with any wing shape, but shapes that reduce drag by shrinking the tip vortex will gain less from it, while a wing with less chord will tend to stall at lower AoA -- causing highly tapered wings to stall at the tip first.

I say "gain" because a tip stall is usually considered bad -- it can cause a spin entry, where a root stall with the tips still flying leads to a straight-ahead stall, other factors equal.