It's not just through bribery.
The usual way is the restaurant gets a "grade pending", goes to admin court and pays "not a bribe" and then knows when it is getting reinspected, so all of a sudden there are notes with times and temperature on everything, the inspector is shown something being thrown away as it is past its 2 hours, the nice looking but unapproved surfaces are replaced with approved ones, etc.
Tim Ho Wan, for example, got a C for violations of being a dim sum restaurant. Then it went and asked for a grade pending and just a couple of weeks later it was suddenly no longer a dim sum restaurant, and got an A. Now, you may not know this, but the DOH internally keeps track of "true As" who they usually won't inspect for a year, and "fake As" (eta: this isn't some conspiratorial claim, prior head of the DOH told me so), who they're going to reinspect as if they were Bs, so in 3-6 months THW is going to have to repeat this unless they end up finding a magical way to be and not be a dim sum restaurant.
Bribery is a less usual way, but for example I recently walked into a kitchen that has never, not once, been cleaned in five years. It was all old grease everywhere, the fridge was way too hot, and still somehow got an A multiple times during those five years with not a single comment relating to cleanliness. I can not explain that any other way than bribery since I know the same inspector who was there was at a neighboring shop and gave them hours of grief.