why did australia go to war in ww1
Because it  pledged its support alongside other states of the British Empire
Military history of Australia during World War I
In Australia, the outbreak of World War I was greeted with considerable enthusiasm. Even before Britain declared war on Germany on 4 August 1914, the nation pledged its support alongside other states of the British Empire and almost immediately began preparations to send forces overseas to engage in the conflict. 
wiki:22228525
Military history of Australia during World War I [SEP] Introduction
In Australia, the outbreak of World War I was greeted with considerable enthusiasm. Even before Britain declared war on Germany on 4 August 1914, the nation pledged its support alongside other states of the British Empire and almost immediately began preparations to send forces overseas to engage in the conflict. The first campaign that Australians were involved in was in German New Guinea after a hastily raised force known as the Australian Naval and Military Expeditionary Force was dispatched from Australia to seize German possessions in the Pacific in September 1914. At the same time another expeditionary force, initially consisting of 20,000 men and known as the First Australian Imperial Force (AIF), was raised for service overseas.