When there is an inadvertent whistle the ball is dead and possession goes to the team in possession at the time of the whistle. Because the Purdue player was in the process of shooting he is deemed to have possession and therefore retains it. It looks bad but they applied the rule correctly.