There is already a very good and accepted answer, so mine is just for added fun.
A very interesting way to visualize this is www.flightconnections.com. It's an interactive map that shows all regularly scheduled direct flights. If you click on Capetown, you can see that nothing goes to Australia and the farthest west you can get is Hong Kong.
Now why is that?
Almost all airlines operate a "hub and spoke" system. That means their is one (or a few) "central" airport that's home to the airline and that serves individual flights to all other destinations. So almost all routes from A B to will have a layover at a hub, so you fly A->Hub->B (unless A or B are a Hub itself). The reason for that is easy: it allows the airline to serve a large numbers of city combination with relatively small number of direct flights. If you want to serve 100 cities with all possible combinations you would need 4950 different flights. With a hub and spoke system you only need 99. The hub also allows the airline to put all infrastructure in a single location since every plane shows up at the hub after every second flight.
Going back to your specific example. Neither Capetown nor Melbourne are hubs, so you would need an airline that has a different hub and serves both airports. Again, flightconnections.com can easily illustrate that if you put in both airports. Turns out the only airlines that do this are Emirates (Dubai), Qatar (Doha) and Cathay Pacific (Hong Kong). So these are your only choices with a single layover.
It tends to be easier if you use a hub "in region", but unfortunately South African (Johannesburg) doesn't serve Melbourne and Qantas (Sydney) doesn't serve Cape Town.
Side note: Looking at the map also explains why some relatively small middle eastern countries have massively large airlines (Emirates, Qatar, Etihad, ..) It's basic geography: with a hub in the middle east, you can connect all continents and the vast majority of the major cities in the world with a single layover. Emirates for example only operates the largest planes: Boeing 777 and Airbus A380. Only a tiny fraction of their passengers are actually traveling from/to Dubai.