What protects an installer from drilling a hole in joist and not hit anything?
If it is at all possible, you make sure you can see the other side before you drill.  In some areas fishing wires into an unopened space is considered concealed work and must be done by a master electrician.
That said, a few tricks I've seen used:
There are many types of electrical toner.  I don't know the name of the one you want for this, we just called it an in slab or in wall toner, but it looks like a metal detector and you can sense wires 6 or 8 inches deep in something.
For holes into the top of walls where something may be stapled to the underside of the stud, you can use a hole saw without a pilot bit (only pilot to get started) and drill only part way through then smash out the plug.
You can also use a skinny  volt ticker like the Fluke LVD1A taped to a stick to sense the bottom of a smaller hole before you drill through.
Depending on the geometry of where you want to check, a stud sensor with electrical sense has better depth than a volt ticker at low price.
You can get a cheap usb inspection camera for your laptop or phone and attach it to a wire to make a camera on a stick.  Drill a hole somewhere safer, put the camera in, take a look.