What is the purpose of the siege the Ukrainian city of Mariupol by the Russian invaders?
It is less about the siege itself and more about moving past the siege and taking Mariupol. The siege is a means to an end - taking it either by siege making it miserable enough for the population and its defenders to give up or to siege it to destruction in which case they can just roll in on whats left and take it.
In every case Mariupol sits geographically in between Russias (and DPRs) thrusts east from DPR and west from Crimea. It must be taken to close this gap, creating a land bridge (thereby connecting Crimea with the industrial centres in DPR with the port at Mariupol for export).
The secondary result would be that if the siege is successful and there enough civilians left, they can claim to liberate it and bring aid to those left, claiming that they are bringing aid that Ukraine did not, that Ukraine left them to starve whilst Russia is bringing humanitarian relief that Ukraine denied them - a sort of hollow secondary PR objective, more for its audience at home than anyone else.

The all important land bridge (here identified in 2015).
https://www.csis.org/analysis/russias-possible-invasion-ukraine
an invasion would mark a significant change in international politics, creating a new “Iron Curtain” that begins along Russia’s borders with Finland and the Baltic states and moves south through Eastern Europe, the Middle East, Central and South Asia, and finally to East Asia along China’s southern flank.
if Russia decides to invade Ukraine to reassert Russian control and influence,
possible axes of advance to seize Ukrainian territory:
a southern thrust advancing across the Perekop isthmus
The West’s appeasement of Moscow when it annexed Crimea in 2014 and then orchestrated an insurgency in Eastern Ukraine only emboldened Russian leaders. In addition, Russian annexation of some or all of Ukraine would increase Russian manpower, industrial capacity, and natural resources to a level that could make it a global threat.
the demand for an exclusive sphere of influence in Eastern Europe and the south Caucasus is to meet Russian security interests. The Kremlin has portrayed NATO expansion to the east as the original sin of post-Soviet international relations with the West that now must be rectified.
Russian Military Option
Seize Ukrainian territory up to the Dnepr River and seize an additional belt of land (to include Odessa) that connects Russian territory with the breakaway Transdniestria Republic and separates Ukraine from any access to the Black Sea. The Kremlin would incorporate these new lands into Russia and ensure that the rump Ukrainian statelet remains economically unviable.
Seize ..a belt of land between Russia and Transdniestria (including Mariupol, Kherson, and Odessa) to secure freshwater supplies for Crimea and block Ukraine’s access to the sea
By taking this route Russia could achieve another goal—the destruction of an independent Ukraine—whose evolution toward a liberal democratic state has become a major source of contention among the Kremlin’s security elites.
Russia could take Kherson and the source of freshwater for Crimea and simultaneously toward the vicinity of Melitopol to link up with Russian forces advancing along the coast of the Sea of Azov. An attack coupled with the assault along the coastline toward Mariupol and Berdyansk.
If Russia intends to conquer the entire country, its forces would need to seize Odessa (whose port facilities would ease Russian logistics) and also cross the Dnepr River at several points to march and fight an additional 350 to 700 miles further west to occupy all of Ukraine up to its borders with Poland, Slovakia, Hungary, Romania, and Moldova.


Ukraine conflict: The strategic importance of Mariupol
It became a de-facto regional centre in 2014, when Donetsk became the capital of the self-proclaimed Donetsk People's Republic.
Mariupol is located 10 km from the areas controlled by pro-Russian separatists and its geographic position makes it strategically important, as taking the city would enable the creation of a land corridor from Luhansk to Donetsk and down to Crimea. For Moscow, the land corridor would secure control of the Ukrainian coast on the Sea of Azov.
Mariupol is also the biggest port in Azov Sea region. The port's deep berths make it particularly attractive for maritime transportation. Other ports in the region, including those in the Russian cities of Azov, Primorsko-Akhtarsk, Rostov-on-Don, Taganrog, and Yeysk, have limited berth capacity. Controlling a port with this capacity would noticeably improve the maritime transportation time and logistics throughput between Russia, Donbas, and Crimea.
Mariupol is also an important industrial centre, where the key metallurgical enterprises are situated. Steel and iron production are strategically important for Ukraine. Moscow understands that taking the city and controlling the main port as well as important industries will put economic pressure on Ukraine's government.
Mariupol is crucially important for Ukrainian military operations along the former line of contact – the front line between Ukrainian forces and separatist militias prior to the invasion. If the city is captured, the Ukrainian forces currently located there will face either logistic isolation and/or encirclement. For Moscow it would mean being able to unite the Russian-backed rebels in eastern Ukraine with its troops in Crimea.
https://www.janes.com/defence-news/news-detail/ukraine-conflict-the-strategic-importance-of-mariupol
From 2015:
https://www.brookings.edu/blog/order-from-chaos/2015/03/19/the-mariupol-line-russias-land-bridge-to-crimea/
Mariupol must be a tempting target for the leaderships of the so-called Donetsk and Luhansk ‘people’s republics’. If they do not intend to implement Minsk II, seizing Mariupol would be an important step to make a frozen separatist-occupied Donbas economically viable. Mariupol is the port through which much of the steel and other industrial products of the Donbas are exported.
Mariupol is also key if the Russians desire a land bridge to Crimea. While taking the land bridge would be doable for the Russian army, holding it would prove costly. It would mean occupying a strip of territory 300 kilometers long, territory that has not shown great sympathy for the separatists or the idea of ‘Novorossiya.’ The Russian army would have to garrison the territory to fend off almost certain partisan attacks.
(In 2015) ..Mariupol has assumed importance as a key indicator of how far the Russians want to go in Ukraine. If they make the wrong choice, the conflict will rage again, the West will react with new sanctions and greater support for Kyiv, and West-Russia relations will plunge to an even lower point.

March 2022:
https://edition.cnn.com/europe/live-news/ukraine-russia-putin-news-03-14-22/h_3cc13b65ffb3165bb7592bd102320
A land corridor has been established between Crimea and Donbas, according to Russian state news agency RIA Novosti.
According to RIA, the corridor provides a strategic route connecting Crimea to Mariupol, which is currently surrounded by Russian and Russian-backed separatist troops.
The land corridor would allow troops in Crimea to join forces with Russian-backed rebels in the self-proclaimed Donetsk People's Republic (DPR), as well as giving Russian-backed forces access to key port cities along the Sea of Azov.
The RIA report also called it an "important route" for connecting Crimea to the steel-making capital Mariupol and the industrial Donbas region.