Why would steps on a staircase not span the full width of the staircase?
It is just bad workmanship. The structure under the stairs that support everything is part of the framing package that is inspected by a county official before it is covered by drywall.

I have worked in homes (I am a trim carpenter by choice) after the framing crew which built the stairs in a number of houses that had 1" gaps to the wall. The original intent was to add skirt boards but in the spirit of cheap, the builder decided not to have them installed and left the 1" space for the carpet to cover. It made me cringe at the look of it before carpet, but in the spirit of getting in and out quick, that is what goes on.