I used to work on container ships.
Every vessel I was on could achieve at least 25kts, and some 26kts during sea trials. The engine was being loaded more than the design limits though, so the maximum we could achieve day to day was 24-24.5kts. We frequently did do this and could sustain it for a Pacific or Atlantic crossing. There were no real reliability problems, but fuel and cylinder oil lubrication went up massively. The planners clearly thought it was worth it though.
Warships can do much higher speeds - like you say, 30+kts isn't uncommon. However, the warships I have looked at have their already quite poor range halved by changing from 20kts to 30kts. We could circumnavigate the globe at full speed without refuelling.
Also because of the gas turbines warships use, they need to run on marine diesel oil, rather than the heavy fuel oil that slow speed diesel engines run on. MDO is about 4 times as expensive as HFO. So warships cost more to run.
So, we frequently found ourselves making journeys faster than warships. I'm not saying they couldn't have caught up if they wanted to, but they didn't.