Why didn’t they add a string limit?
Then again, what is an appropriate limit on the length of the name of a HomeKit device? I'm tempted to say 255, but I'm sure someone else would disagree. I've been in design meetings where such things were discussed, with lots of bikeshed, so it's also understandable that, with deadlines and other priorities, they decided not to impose any limit.
"Why not 1023?"
"Even 1023 is too long, I don't think anyone would need that."
"What if <long and convoluted use-case>?"
"How about 32?"
Having been in a few meetings that went in that direction, I am not surprised that they couldn't agree on a limit. "Design by committee" at its worst.