For example… Speeding
Going down the highway doing 10 oven the limit and you get pulled over an dgive a hefty ticket… But Nothing bad happened.
Another example… Letting a Tesla do full self driving but you aren’t paying attention. The car is driving itself quite well but you are ticketed for undue care and attention… But there was no accident or anything… Nothing happened.


The act itself is unsafe and could kill you or another person so the punishment is supposed to act as both a deterrent from doing those things and a response to irresponsibility that put others in danger.
There are acts that we’ve determined are unsafe enough that we don’t want to allow them so even in a “successful” execution of that act you still violate a law.
Found out recently a friend of mine scrolls tiktok while driving. He has a kid too btw. The law is there to protect OTHER people, not to give you a mild annoyance