Actually, it is a rule:
With :00.1 remaining in the third period, Player A2 tips a “high lob” throw-in from Player A1 which results in a successful field goal. Shall the field goal be scored? If the ‘high lob’ is adjacent to the rim, Player A2 may tip or ‘slam
dunk’ the ball. Player A2 may tip the ball from anywhere on the court
with :00.1 or more remaining in the period. However, if the ball is a distance from the rim, the ball may not be controlled unless :00.3 or more remain on the game clock.