The purpose of Samatha Bhavana is to obtain a pleasant abiding in the here-&-now (AN 4.41) so the mind has a source of pleasure that is superior to (AN 2.66) & therefore overcomes the need for using (dangerous, troublesome, diminishing value & unsatisactory) sensual pleasures as a source of happiness (MN 75).
Keep in mind the 'Middle Way' taught by the Buddha (SN 56.11) is that way of life that seeks the pleasure of jhana. The Middle-Way is not a path of deprivation or torment.
In addition, Samatha or Tranquility is also one quality contributing to the stability of Concentration ('Samadhi'). Concentration serves as the means to Insight (Vipassana).
That said, Samatha Bhavana cannot permanently stop or 'uproot' the tendency towards desire (craving). Only Vipassana Bhavana can uproot desire.
However, as already stated, Samatha Bhavana does help in giving up much sensual desire since the pleasure of Samatha Bhavana is superior to the pleasure of sensuality.
To quote the scriptures:
Bhikkhus, there are two kinds of pleasantness. What two? Sensual pleasantness and the pleasantness of giving up sensuality. Of these
two, the pleasantness of giving up sensuality is better.
AN 2.66
~~~
Māgandiya, a delight apart from sensual pleasures, apart from
unwholesome states, which surpasses even divine sensual bliss. Since I
take delight in that, I do not envy what is inferior nor do I delight
therein.
MN 75
~~~
There is the development of [mind using] concentration that, when
developed & pursued, leads to a pleasant abiding in the here &
now....There is the case where a monk — quite withdrawn from
sensuality, withdrawn from unskillful qualities — enters & remains in
the first jhana...
There is the development of [mind using] concentration that, when
developed & pursued, leads to the ending of the effluents....There
is the case where a monk remains focused on arising & falling away
with reference to the five aggregates...
AN 4.41 Samadhi Sutta
~~~
These two qualities have a share in clear knowing. Which two?
Tranquillity (samatha) & insight (vipassana).
When tranquillity is developed, what purpose does it serve? The mind
is developed. And when the mind is developed, what purpose does it
serve? Passion (lust) is abandoned.
When insight is developed, what purpose does it serve? Discernment is
developed. And when discernment is developed, what purpose does it
serve? Ignorance is abandoned.
AN 2.30
~~~
O monks, the well-instructed noble disciple, seeing thus [the five
aggregates are impermanent, unsatisfactory & not-self], gets wearied
of form, gets wearied of feeling, gets wearied of perception, gets
wearied of mental formations, gets wearied of consciousness. Being
wearied he becomes passion-free. In his freedom from passion, he
is emancipated. Being emancipated, there is the knowledge that he is
emancipated. He knows: 'birth is exhausted, lived is the holy life,
what had to be done is done, there is nothing more of this becoming.'"
Anatta-lakkhana
Sutta