Hi Simon,
This is an interesting question. Unfortunately, when someone leaves their country of nationality (e.g. Australia) and go to another country (holiday country), they are subject to that country's laws for the period of time they are in the country. Sometimes, that country's laws (holiday country) says the laws of the person's national country (e.g. Australia) may apply or that the person will be deported and sent back to home country to be charged under home country's laws (this would be governed by diplomacy and international relations).
In the Bali 9's case, when they went to Indonesia, they came under Indonesian law. Most country's conflict of laws rules say that a person may be deported back to home country to be punished if the home country recognises a similar crime under their law with similar punishments. Indonesia is still free to choose whether to deport or sentence (again, this is governed by international relations and diplomacy).
Australia's domestic laws cannot be used on another country (called "state"). Countries are only governed by international law (and very badly governed, while we're at it). This is due to a principle called "recognition of state sovereignty and the principle of non-interference". The reason is, Australia would not want its government or its people or its government system (including laws) to be put on trial and punished at the whim of some other country's laws (think: Australia and Australians coming under Sharia law or the laws of Saudi Arabia and the Saudi king able to prosecute the Australian government or Australians in Australia under their own law). Because we wish to avoid this scenario, Australia will respect other states' actions/laws in exchange for those same states respecting Australian law and actions. For this reason, Australian law cannot be used to punish Indonesia or Indonesians doing stuff in Indonesia.