Screws and their holes have a few of problems:
Screws are formed, so nowhere near as accurate as a hardened, ground pin. You probably could harden then grind a screw thread but obviously much more expensive. Probably only used on things like micrometers.
The tapping operation itself removes a fair amount of material. Second only to the drilling operation. Large cuts require large forces which produces lots of heat which results in heat expansion, deflection of the tool, and compression (and resulting rebound) of the material, all of which reduce accuracy of the hole.
For applications where location really matters, you can't even bring the parts together with screws because the tolerances are too tight, even if you had super accurately ground screws and super accurate tapped holes:
If you have to do something like placing the top half of a heavy steel die onto the bottom half you can't really do that with locating screws installed; They'll just sit on the screw tips. So now you have to rotate all the screws at the same rate or else it will tilt and jam and not only that you have to somehow position each screw relative to it's hole before you start turning
all at the same speed because they must all engage their threads at the same time.
Nor can you place the top die onto the bottom die and then insert screws because the part has nothing to
locate against while lowering. What are you doing to do? Set the parts against each other and then bang it over and over again with a mallet as you try to adjust the position so that you can get the screws to go through? *Actually, pins have a similar but solvable problem here too where if the parts aren't lowered exactly right the pins will jam and the part won't go down, even if the pins are chamfered. It will catch and bind on the chamfer. Apparently the solution is to add a small ring of rounded undercut or relief right behind the head of the pin and radius the head so it curves into the relief. Then you radius the hole that it mates with. If you size everything correctly, the half being lowered can catch and rotate within the space provided by the relief as it comes down and self-locate. I don't know the name of this but it's been around a very long time.
Since the pin is more accurate you can also make use of a more accurate hole. To make a hole for a pin you first drill the hole (to make a hole, duh) but the drills are designed to remove material and remove material fast so the hole doesn't have a very good finish and isn't as centered, straight, or round. They hog material and can flex and dig their own path through the material.
So you then bore the hole which shaves off the periphery of the hole and since the tool itself spinning around a location centered in the air (in the hole made by the drill), it ensures the center of the hole is where it should be be. Boring makes sure that holes are located where they are supposed to be.
Finally, you ream the hole shaves of small amounts of material off the edge to ensure that the hole is the diameter it should be. Reaming ensures that holes are straight and of the proper diameter.
Skip reaming and your hole may be centered at the correct location but be the wrong diameter. Skip boring the hole and your hole may be straight but off-center (from where you need it to be). Not that you couldn't do those operations before tapping the hole, but those are some crazy excessive operations for most screws.