I just view it as good practice. Even when all the fasteners are theoretically the same, sometimes the real world throws a curve ball. In fact, last summer I replaced the valve cover gaskets on my antique car, and did NOT do my usual practice of keeping the bolts to their original holes. Sure enough, one bolt would only go back in its original hole. Somewhere along the way it may have been crossed or damaged as a set, and I had to work through all the possibilities until I found the one that fit. Fortunately a valve cover is not as critical as a head, but given the situation, even if it all fit together I might not have had a good seal at that location.
And that’s without accounting for the weird stuff you see sometimes, like when someone forces a metric fastener into an SAE hole of close size, essentially re-tapping the hole. Best to play it safe.
ETA: I realize the OP was asking about head bolts specifically, which are often TTY, but nonetheless appropriate I think. Oh, and IANAMechanic.