1) Back in the day, you could refuse a breath / blood test without much consequence (today your license gets suspended, etc). So you refused the test that would prove you were drunk in court.
2) Back in the day, not all cop cars had cameras. So even if you failed the field sobriety test, you had another chance back at the station.
3) Once at the station, if you were sober enough to make a good video, then either the prosecuter dismissed your case or your lawyer was able to convince a jury based on video evidence, you were able to operate a motor vehicle despite the officers testimony to the contrary.
or lastly
4) You plead guilty with the provision that the conviction be removed from your record following the successful completion of your sentence, payment of fines, attendance of classes, and a certain number of years of good behavior. You would still have an arrest record, but no conviction. This only works if your background is spotless, you have a good lawyer and the judge agrees.
Today you are mostly screwed from the beginning. Even if you refuse the blood / breath test (in Texas, many nights are no refusal nights, where you legally cant refuse), the field sobriety tests are now filmed by the cops car camera so your chances of beating it are slim to none. Most juries side with that nice looking cop in his startched uniform with the shiny badge and nice gold plated pencil set in his shirt pocket, who will "exaggerate the truth" if necessary to get you convicted. :'(
Moral of the story? Dont drink. If you do, dont drive. And please dont be stupid enough to carry bottles / cans in your car that are open.