Why is roof underlayment nailed in?
Staples are far more prone to cause leaks than roofing nails. For a  pro roofer with a coil nail gun, they save no time at all .vs. using nails. For a non-pro who can actually use a hammer, they save very little time .vs. nails.

Likewise, in the normal process of construction, it's quite common to have some period of time where the underlayment is the only thing on the roof surface. While you may have time to screw around with "a strip of underlayment, a few rows of shingles" it's not efficient for a roofing crew - get the underlayment on the whole roof, which is then considered "dried in" as it will immediately shed water if not left like that for too long, come back and shingle (if shingles are what you are using on top) in one go.

(While we are here, might as well mention considering upgrading to ice and water shield, aka self-sealing membrane, for at least the bottom few courses as insurance in case of ice dams. Some folks do the whole roof with it.)