This is not strictly true. Almost all modern liners and bulk cargo / container carriers, icebreakers & ice-going cargo ships with high maneuverability needs are moving towards the diesel(fuel oil really) electric propulsion systems or converting COGAS (Combined Gas and Steam) propulsion to COGES (Turbo Electric). Particularly after the introduction of pod based propulsion of ships, which allowed high powered motors to be located outside the ship without a large drive and enable fine directional thrust control.
(See Azipod) https://en.wikipedia.org/wiki/Azipod
Liners such as the Queen Mary 2 are an easy example of Diesel Electric propulsion. https://en.wikipedia.org/wiki/RMS_Queen_Mary_2#Power_plant_and_propulsion_system
Main reason that so many ships are still ICE direct drive is purely out of economical (they are cheaper to build) and legacy entrenchment & support industry reasons.
See this MAN Marine article page 2,3,4.
https://marine.man.eu/docs/librariesprovider6/marine-broschures/diesel-electric-drives-guideline.pdf
If shipping lines see the efficiency benefits of Diesel Electric propulsion and the economics fall into place, diesel eletric will completely take over. In a way they already have, it's just that most ships also have incredibly long useful operational lifespans, so it takes a very long time to start seeing meaningful change on a global scale.
See shipjournal article about DE drive too.
https://www.shipjournal.co/index.php/sst/article/view/10/62
Here's another study on COGES vs Diesel Electric Propulsion (PDF)
Comparison of COGES and Diesel-Electric Ship Propulsion Systems
There are also construction benefits of Diesel-Electric in ships allowing heavy equipment to be distributed better and provide structural strength benefits.
http://www.professionalmariner.com/October-2007/Diesel-electric-propulsion-pushes-ahead/
And finally a nice article on the basics of ship propulsion by MAN Marine.