Why do most guns still use slotted machine screws?
The slotted screw, IMHO, is from tradition and functionality. Coins, knife blades, and yes the rim of a spent casing can extract the screw. For example on the need to strip one in the field. M1 Carbine charging handle jumped track one day and left a live round in the chamber. All I needed was a spent casing to remove the stock so I could get the charging handle back in place so I could remove the live round.
I think ohgerr probably has the best answer. He’s getting my vote. Slotted screws are good for high torque and with a proper design (recessed and tapered head) can be fairly easy to lock on to. They can also be held nicely with a crew launcher for inserting into tight places. Philips have decent drive and can be driven at angles but they don’t have the drive of a slotted screw and can round out making them difficult to remove. They look much nicer though. Allen look nice but are subject to stripping out easy (especially if seized from a prolonged installation) and require a large tool assortment as the fit must be perfect (some 30+ tools compared with the 4 or 5 screwdrivers that would be needed). Torx are an excellent choice for both appearance and torque but again require a larger more complicated tool assortment. On the plus side, both philips drive and Torx can be improvised with things like small slotted screwdrivers in a pinch. Pozi is just an overly complex philips design, not s
Tradition may play a part, but I’d think its because (a. its easier to find slotted screw drivers in the field. (You can substitute a coin, a knife blade, or if you’re lucky you might even have a slotted screw driver built into your knife blade.) With those other kinds of screwdrivers you need to have a specialized driver with you. (b. they work well enough and so there is no need to change.