I believe that you have a misconception about airline alliances.
Airlines compete within an aliiance. CX and QF have different bottom lines and both care about their own profit.
Yes, the purpose of alliances is to attract more pax to the alliance, and possibly reduce some costs, so that there is a synergy and the group benefits overall as the total number of pax to the alliance is larger than without alliance. But that does not rule out intense competition among airlines of the same aliance. The purpose of an alliance is hopefully NOT to create a collusion that would stiffle competition at the expense of pax. Apparently this is what you have in mind when you suggest that QF and CX should "fix" their cartel relationshing on the HK-Australia route.
A side note regarding codeshare: for frequent flyers this is less useful within an alliance than across alliances. Codeshares with an airline not part of the alliance allows the pax to earn miles on his preferred alliance by having ticket issued in that airline code. This is very useful for connecting domestic flights (e.g. AF, member of skyteam, has extensive reciprocal code share agreements with OW airlines QF and JL). While this is not necessary if both airlines belong to the same alliance.
But codesharing can cover many arrangements. Often, there is some revenue-sharing agreement. On some routes with few flights, this is detrimental to competition and pax. While airlines have some marketing blabla about schedule harmonization and improved service, such collusion implies higher ticket prices. Fortunately CX and QF cannot share revenues as 1) there are some other competitors on the route (VS, BA,) and 2) the Australian government might object.