Maybe if they knew ahead of time, but they didn't, so it was just a joke, and in no conceivable way an insensitive one.
Being called to the manager's office is stress-inducing for most people and presumably the person was having issues in their role beforehand and was expecting something serious. To make a joke about such things is beyond callous.