Google defines obedience as:
> compliance with an order, request, or law or submission to another's authority
So going by that definition, following the law is indeed "obedience". Similarly, complying with a court order would also be "obedience", as would pulling over to the side of the road when a police officer drives behind you with their lights and siren on, or listening to a lifeguard at a pool when they tell everyone to get out of the water.
In fact, if we're going by the dictionary definition of obedience, I would argue that obedience is necessary for the very existence of civilized society.