I agree with the people saying that there are only just so many mechanical possibilities .
I think another reason for the sameness in gun designs is an evolutionary situation.
For example, you can, as Luger proved, operate a pistol with a "Toggle action", however expense of manufacture and reports of jams leave manufacturers and shooters both avoiding the design.