Planes do fly over the Pacific Ocean. However, flights to Australia only go over the Pacific Ocean if you are flying from North America. Even the flights to Australia from Chile and Argentina largely go over the Southern Ocean, because the curvature of the earth makes that a shorter route.