This used to be the normal way to make sure your logs weren’t 99.99% abuse attempts on low- to moderate-traffic sites, back in the day. Deny a few country-specific IP blocks and almost all of it went away. Maybe you lose one in ten thousand legit requests. Oh well.
Cloudflare’s the modern version of it, complete with factoring in origin location to a request’s likelihood to be abuse.