"Why do the Nationals and Liberals work together while the other parties (Labor, Greens, etc) are by themselves?"

In the Australian Parliament, political parties can choose to work together to achieve their aims or create a bigger groups by working together. When parties work together it is called a coalition.

The Liberal Party of Australia and the Nationals have formed the longest-running coalition in the Parliament. Their partnership is sometimes called the Coalition.

Members of the Coalition—Liberal Party and Nationals members—sit next to each other in the Senate and House of Representatives. They generally vote the same way, although they may have different ideas on particular bills—proposed laws. Each party holds separate party meetings and elects the leaders of their own party.

The political parties fact sheet has more information about coalitions.

diagram to help explain Why do the Nationals and Liberals work together while the other parties (Labor, Greens, etc) are by themselves?