You're probably correct that the Somalis' intent was to secure the ship and ransom it.
Remember that the pirates were successful only on their second attempt, after an extended chase that put them far outside the original range of capture. Their first (failed) attempt involved two teams and a "mothership" on standby, providing more manpower if nothing else. That first plan may have involved a further network who could tow the captured ship to shore, and "upper management" was within range to dictate action, transport the hostages elsewhere, et cetera. So much goes wrong during the narrative that we tend to see all decisions as acts of unplanned desperation after a point, but we can still guess at their original intentions if when they try to tow the Maersk with their lifeboat, they were following the same playbook as they started out with two teams and the mothership. It's just moot by then.
Speaking of narrative, the film is based on the questionable personal account of Richard Phillips, and further creative license may have been taken by director Greengrass. Neither of them are in a position to speak the minds of the real life pirates who attacked the Maersk Alabama, and may have deliberately left it vague in the storytelling.
The 2012 film A Hijacking (original Danish: Kapringen) is similarly about a commercial ship captured and ransomed by pirates, and painstakingly covers the negotiation process that concludes in a large payout, suggesting that pirates in general are driven by this goal.
Author Jay Bahadur wrote an illuminating article for The Guardian in 2011 about the lives of Somali pirates, the motivations for hijacking commercial ships, chain of command and ransom payouts, and so on.
... The commercial ships, identifiable by the cranes visible on their decks, were much slower and easier to capture.
... Instances of the crew fighting back were rare, and rarely effective, and the whole process, from spotting to capturing, took at most 30 minutes.
... The captured ship was then steered to a friendly port – in Boyah's case, Eyl – where guards and interpreters were brought from the shore to look after the hostages during the ransom negotiation.