The first ones were 6061 because that was what was available. It needs post-weld heat treatment (i.e. the whole frame has to be heat treated). Then 7005 became more common, because that doesn't need any treatment after welding (and also means repairs are theoretically possible, although most people would junk a broken alu frame).
Apart from cheapness, aluminium doesn't have a whole lot going for it in the age of carbon fibre (for ultimate performance) and super strength steels (for later adaptability and bespoke options). Titanium is corrosion resistant, of course, but I've never been convinced it's the ideal material - just something that was a bit lighter than steel at the time, and suddenly became plentiful with the end of the Cold War.