I've noticed Australia and New Zealand calls their military a defence force. Is there a legal reason for this?
In general, it's just a name. "Defense" or "Defence" being another term for "military". The US, for example, in 1947 merged the Department of War (basically the army) and the Department of the Navy into a single department and in 1949 named it the Department of Defense. With the US military since World War 2 geared towards global power projection "defense" is double-speak.
However, some countries have legal, often constitutional, requirements which attempt to rein in the military for defensive only operations. "Defensive" meaning they cannot operate effectively much beyond their own borders. Let's look at Australia and New Zealand specifically asked about in the question, and Japan for an example of legally defined defense forces.
There's no legal reason I can see beyond their Constitution referring to Parliament's power of "military defence".
The Royal Australian Navy was capable of operating world-wide with the Royal Navy during World War 2. Until the 1970s, Australian Defense Forces operated under the euphemism "forward defense" to cooperate offensive operations and interventions such as the Vietnam War. After that, the 1980s would see the ADF focusing on defending Australia itself. In the late 90s the ADF became more expeditionary to cooperate with international efforts such as East Timor and Iraq.
The New Zealand Defence Forces were created by the Defence Act of 1990. Prior to that the New Zealand Army, Royal New Zealand Navy, and Royal New Zealand Air Force were separate. Section 5 defines a very broad role for the NZDF.
a. the defence of New Zealand, and of any area for the defence of which New Zealand is responsible under any Act:
b. the protection of the interests of New Zealand, whether in New Zealand or elsewhere:
c. the contribution of forces under collective security treaties, agreements, or arrangements:
d. the contribution of forces to, or for any of the purposes of, the United Nations, or in association with other organisations or States and in accordance with the principles of the Charter of the United Nations:
e. the provision of assistance to the civil power either in New Zealand or elsewhere in time of emergency:
f. the provision of any public service.
The Japanese Self-Defense Forces are defensive. Their WW2 surrender terms denied them a military with the Allies, primarily the US, providing defense. Article 9 of their constitution removes their ability to use force to settle disputes with other nations. Here is the English translation.
(1) Aspiring sincerely to an international peace based on justice and order, the Japanese people forever renounce war as a sovereign right of the nation and the threat or use of force as means of settling international disputes.
(2) In order to accomplish the aim of the preceding paragraph, land, sea, and air forces, as well as other war potential, will never be maintained. The right of belligerency of the state will not be recognized.
However, that second part got severely bent around the definition of "war potential" and their right of self-defense.
The 1951 Security Treaty Between the US and Japan formally established who got to police what: the US and only the US could garrison troops in Japan, and...
Japan will itself increasingly assume responsibility for its own defense against direct and indirect aggression, always avoiding any armament which could be an offensive threat or serve other than to promote peace and security in accordance with the purposes and principles of the United Nations Charter.
When the Korean War took the attention of US occupation forces, Japan was allowed a National Police Reserve (Keisatsu-yobitai) and Coastal Safety Force (Kaijō Keibitai). In 1954 these became Ground Self-Defense Force (Rikujō Jieitai), Maritime Self-Defense Force (Kaijō Jieitai), and Air Self-Defense Force (Kōkū Jieitai).
Since then, exactly what constitutes a "defense force" has been debated and tested mostly centered around its lack of power projection. Japan is an island making the problem a bit simpler. For example, Japan possesses no dedicated bombers. No nuclear submarines. No long-range cruise missiles.
Japan has, for obvious reasons, denounced nuclear weapons and will not allow them to be stationed on Japanese soil. However, their nuclear industry means they could develop nuclear weapons rather quickly. That they have not is telling. However, they've recently left open the option for tactical nukes.
A series of recent subtle legal changes has eroded their "defensive" status. The main justifications given are...
- Reduction of their dependency on the US.
- Ongoing disputes with China.
- Desire to contribute to the global War on Terror and piracy.
- Desire to protect against domestic terrorism.
A 2015 reinterpretation of Article 9 now allows participation in collective self-defense with their allies. They can now operate with the UN and US, or act to protect their citizens abroad.
They now have "multi-purpose operation destroyers" which are able to operate the F-35B stealth fighter-bomber. They're "destroyers" because "carriers" are offensive and they're totally not a carrier (they're carriers). Their Airborne Brigade, previously primarily for rescue and civil operations, is now a regular part of the defense forces. And in 2018 they added an Amphibious Brigade under the justification to counter attacks on their outlying islands.
Even with constitutional restrictions what is "defensive" is open to interpretation.