Sorry, a person's right to be a complete moron (opening a door while a car is moving) doesn't trump everyone else's right to not be endangered by said moron.
There are a lot of reasons you might have to open and the close the door while driving, for example if your jacket or something got caught in the door and you don't realize it until you're on the road. Done that many times, it's not unsafe except if the car decides to auto-brake.
Sorry, you seem to be quite young and life-inexperienced.