When I joined HM Forces as a pilot in the 90s, the nationality requirement was UK, RoI or Commonwealth. The 5 year UK residency rule also existed but was waived in my case on the basis of 'needs of the Service'.
Everything changed after 9/11 when the US put pressure on UK to restrict the number of nationalities it recruited, in particular to branches with clearance to Secret UK/US or beyond. Hence the British or British/Dual nationality requirement for aircrew. As has been said, other branches have different nationality requirements (e.g. to play rugby for Army you must be from Fiji...)