I don’t know Blake Griffin’s intent. He was upset with the official about a foul and immediately apologized to Dennis Schroder. This might have been accidental.
But a technical foul was absolutely the right call. You can’t allow players to throw the ball at the back of an opponent’s head during a stoppage, purposefully or not.