Have you ever urinated on the side of the road because you had no access to a bathroom

So the other day we were driving home from Vegas to California. Anyone who has ever driven this highway knows this is LONG stretch of desert and not much else. I had to pee and there was no bathroom for miles. So we pulled over the car and peed on the side of the road, this is breaking a law. Had a police officer happened to see us we would of been cited even though the closed bathroom would be a hour or more drive to reach it and it was late at night so chances are all the business would be closed. Do you think if we got caught we deserve to get in trouble with the law?