NBA referees are far from perfect. They fall for flops, give special treatment to star players or in some cases, they bounce the ball to an unsuspecting player about to take a free throw:
Spurs guard Manu Ginobili decided that this warranted a technical foul and took the liberty of handing one out to the ref. Can you imagine a world where NBA players could give out techs? Would Joey Crawford even have a job anymore?