1-the writers did it so her death will be meer tragic.
2-John wanted to make sure she wouldn't be with Jeremy anymore. He taught of himself a bit as Jeremy's mentor and he wanted to protect him from what he considered to be evil. That's also why he threw Damon in the flames, he wanted to protect Elena.
3- Anna, unlike Damon, grabbed John's leg and begged him not to let her burn so he killed her on the spot and let the other vampire simply burn.