Mitsubishi Heavy Industries doesn't have an experience to build submarines overseas and there were significant risks leaving someone to "learn on the job".
USA has been (correctly) pressuring Australia to select vendor on its merit and not to take into account geopolitics. Geopolitically, Japan is a lot more important to Australia than France. This is the reason Japanese believed for so long they had the deal in the bag.
With Abbott losing his job, it became easier for France or Germany to hop in. Especially when new prime minister had agenda of damaging previous PM. I think Abbott must feel terrible about Japan not getting the contract but it only shows deals like these should be done at arm's length. Abbott even wrote personal letter to Japanese PM to apologize.