The real facts about why this happened are still scarce but what is know really does point to a major navigational f$#k-up by the boat crews. This is especially sad because they could downloaded a marine plotter app on their cellphones for free that would have kept them out of trouble.
I did a tour in Coastal Warfare (now NECC) and (at the time, at least) the training and preparation provided by the TYCOM for riverine squadrons was inadequate at best. Of course it was a RC community at the time and is now active duty and I don't know what has changed.
These boats are fairly new CB90's (RCB's) supposedly equipped with late-model Furuno plotters. Don't know whether the plotters (on both boats) were inoperative, there was no one looking at them, or there was something else going on. There are reports that one of the boats was having engine trouble but also reports that wasn't the reason they ended up in Iranian waters. If you are a US Navy crew in a disabled small boat in the Persian Gulf, your number one mission is to avoid ending up in Iran... not sure how they hosed up so badly. I all but positive the Iranians didn't "jam their comms" or whatever to cause this incident. The most important point is the JCPOA goes into effect TODAY... had the Iranians made trouble/caused this incident/not released the sailors, etc, they would risk delay or disruption of the JCPOA, which they see has a major political victory key to their national security.
CDR Salamander and others around the internet have made the likely-accurate point that there was a major failure of leadership by the chain of command that these crews set out to transit from Kuwait to Bahrain and ended up in Iran. There is likely a long list of failures (links in the chain...) that led to this incident. Probably there should be an investigation into the training, preparation, and procedures for operating RCBs in the Persian Gulf and probably several CO's in the chain deserve to be relieved. I suspect, for political reasons, that wont happen. I also suspect that the Coastal Riverine Force has concentrated more on MESF (Maritime Expeditionary Security Force)-style training (ashore security stuff) vs small boat handling and navigation since they were only recently created by the merger with MESF, and that was a contributing factor to this incident.
Finally I don't necessarily fault the Lieutenant for making the apology to the Iranians. He was not a POW, we are not engaged in armed conflict with Iran (today, anyway), so I would say the Code of Conduct does not exactly apply to his statement, and it does look like the incident was his fault. Had it NOT been his fault and he was illegally captured by the Iranians in international waters, then I would agree the Code of Conduct would apply and he should not have made any statement other than as provided by the Code of Conduct.