He did get the ball. Williams lost control of the ball as a result.
The refs were looking for an excuse and they found one when he swung at the ball and got Williams on the follow-thru instead of just going for a block and avoiding contact.
They were both weak calls. Williams was in his face and had his arm around Allen in the first one. Allen's mistake was throwing him off. Allen needs to play basketball and avoid the dumb stuff.