It's based on the origin and destination country. Australia requires this for inbound flights from most countries, but there are some exceptions (like New Zealand and USA - there are a few others as well).
Some inbound flights to the USA also have this, depending on the departure country. I had...