Or putting it another way, the Rock had a 100% success rate for preventing passage by major surface combatants ... probably not because of the deployment of anti-submarine assets, either
Knives cut both ways
That could be that the reputation if Gibraltar worked to dissuade attempts by surface vessels, or more likely because there was no interest, the Germans having no spare surface units for the Mediterranean and the Italians had their hands full and no interest, or strategic need, to pass into the Atlantic.
The 'Channel Dash' showed that shore defences were completely ineffective, I know the Channel is wider than the Straits, but there guns were mostly out of date and would probably not perform well against moving targets. Both the Scharnhort and the Gneisenau were damaged in the dash, by mines laid by other forces. I maintain the point made earlier, Gibraltar its self has little effect, apart from in its own defence as a fortress, as with the 'Channel Dash', it requires other forces (air and naval) to close the straits.
The Italians also didn't have the fuel to do anything much with their navy. They had stupidly started the war with no (or virtually no) fuel reserves and relied entirely on begging to Hitler for fuel to keep the Regia Marina's fleet units in bunkerage ... Hitler, who didn't have any fuel to spare, really, "gave" them fuel from the Kriegsmarine reserves ... which, of course, made the Kriegsmarine so happy that they delivered in full and on time ... not.
That's the real reason most of the RM's major fleet units did nothing but stay in port ... only enough fuel to keep maintenance levels of operation.
So, even if the Italians had had a reason for attempting operation(s) that required movement through the straits, they probably couldn't have fuelled it without willing assistance from the Germans.
As for the Germans and the Kriegsmarine ... well, they did pre-war reserves, but were basically at the end of the list for fuel supplies, of which Germany was always short.
After the initial wave of conquests, where the Germans captured enough from the strategic reserves of their opponents to replace the fuel they expended in capturing them, the Germans were always severely short of fuel.
It is my understanding that even operational level decisions regarding deployment of forces were being made based on fuel shortages as early as 1941 ... so, even if the Kriegsmarine had seen value in forcing the straits, what would be the Heer and/or Luftwaffe operations that would have to be short-changed to fuel it?
No easy answers.
Author, Space Opera (FGU); RBB #1 (FASA); Road to Armageddon; Farm, Forge and Steam; Orbis Mundi; Displaced (PGD)