Why did Apple not test what happens when a user supplies “True” as their last name? Is it incompetence?

I don’t think so. I think the explanation is simpler: it’s not feasible. It’s highly impractical, if not computationally impossible, to test every input.