"Why didn't" questions can make good questions of the comparison-contrast variety. In literature, it took the form of "Why didn't the dog bark in the night," when dogs usually do under similar circumstances (Sherlock Holmes). The answer was that the criminal was known to the dog, and the crime was an "inside job." That said, there are good "why didn't" and bad "why didn't" questions.
A bad "why didn't" question is something like "Why didn't the sun fail to rise today?" That is a question in a vacuum, and there is no motivation for it. A better question is, "Why hasn't the sun ever risen in the west instead of the east?" (Answer, because of the direction of the earth's rotation.) An even better question is, "Why hasn't the sun ever risen in the west instead of the east when it does on Uranus? (Because Uranus' direction of rotation is the opposite of the earth's. The latter two questions benefit from what I call comparison/contrast. You've demonstrated that your question is plausible in case A. What is it about case B that makes it different? Such a question is not "opinion based" because it is possible to list the factors that made things possible for A, and then show that these same factors did not exist in the case of B.
This is what I consider a good (or at least "not bad") "why didn't" question. It has one case, Hong Kong, that demonstrates that the question's premise is possible, and then ask why certain things happened there, and not Gibraltar; what were the differences between the two cases. There are some superficial similarities between Hong and Gibraltar. They were both strategically located, and both controlled by Britain, a Maritime power. Things just developed differently historically; e.g. Hong Kong, although "small" on both counts, ended up with a land area and population more than 100 times greater than Gibraltar. There were other important differences in the immediate environment. True, the question demonstrates a certain factual ignorance, but this, unlike e.g. ignorance of History SE protocol, isn't anything to be ashamed of.