Wrongly punished IMO. How can you know where the ball was going to be struck and have time to react!
So if a player was about to put a cross into the box and the defender does a superman style jump to block the ball, you wouldn’t give handball because they couldn’t predict where it was going?