I too feel you did the right thing.....IMHO.
If no one was trapped in the car and the vehicle was fully involved, there would be little to accomplish with an extinguisher. Not to make light of it, but for insurance purposes, it is probably better to let it burn.
Between exploding bumpers, gas tanks and toxic fumes, you made the right choice.
You never know, you may have saved a life by warning people of the problem.