Quoted below is from Bodhicaryāvatāra, as it read, I think, the answer to your quotation is that the purpose is to tranquilize sorrow, although in the ultimate reality its effect is illusionary it not forbidden as it leads to tranquilizing sorrow. I think we could also say it leads to dispassion.
The Ego is neither the past nor the future thought, because that is
seen not to exist.
But if the Ego is the production of thought, when that has disappeared
the Ego does not exist.
Just as the stem of a banana tree does not exist when it has been
divided into parts,so the Ego likewise has become unreal by being
examined reflectively.
It may be thought that because a being cannot be found, there is no
one upon whom to bestow compassion; but whatever is done [even] in a
state of confusion is because of a purpose.
> Yet if there is no being, whose is the purpose? Truly the effort is illusionary; but because it is for the sake of tranquilizing sorrow,
the delusion of purpose is not forbidden.
Because of the delusion of self, the concept of one’s individuality,
the cause of sorrow, is increased.
Since it is destroyed in no other way, the concept of nonself is
preferred.
The body is not the feet or the legs or the breast.
Neither is the body, the hips, the belly, the back, nor the arms.
It is likewise not the hands or the sides or the armpits or the
shoulders or any external mark.
The body is not the neck or the head. What then is the body?
If the body finds itself partially in all [parts], the parts find
themselves in parts, and so where does the body itself abide?
If the body is everywhere completely in every part, then there must
exist as many bodies as there are parts. The body is neither within
nor without. How is the body in its parts?
How is it outside its parts? How indeed does it exist?
The body does not exist, but because of delusion there is a body-idea
in its parts: because of a kind of fabrication, like imagining a man
in a stump.
As long as there is a complete collection of causes, the body is taken
to be a man.
Likewise, as long as it is in its members, the body is seen there.
In the same way there can be no foot, because that is a mass of toes.
The limb is likewise a collection of limbs, separated according to
their parts.
The parts also are split into atoms. The atom also is in six sections.
The six sections are empty space without parts. Consequently there is
no atom.
When the form is like dream, then who will deliberately fall in love
with it?
And since there is no body, then what is a woman? And what is a man?
If sorrow really does exist, why does it not oppress the joyful?
If happiness is dainty food, why does it not please those involved in
present grief?
If happiness is not experienced, because it is surpassed by something
more powerful, what kind of a sensation is it when the essence is not
experienced?
If sorrow is a subtle state which is destroyed by that which is gross,
is it not possible that the other state is a degree of satisfaction?
It follows that satisfaction is also a subtle state.
If sorrow does not arise in the presence of a contrary cause, then
what is called “sensation” has arisen only because of adherence to a
fiction.
This examination has for this very reason been its antidote.
The food of the Yogīs is that contemplation which has arisen in the
field of imagination.
If there is an interval between the sense and its object, how is there
a contact between them?
If there is no interval, they are a unity; and how then is there a
contact?
There is no entering into an atom by an atom; it is equal [to the
other atom] and without free space.
Without entering there is no mingling, there is no contact.
How can contact really arise from that which is without parts? And if
that without parts has been seen in contact, let it be indicated.
Contact cannot be made without consciousness, which is formless, nor
with an aggregate [of parts], because of its unreality, as previously
demonstrated.
If this contact is not in existence, how is it the origin of
sensation?
For the sake of what is this effort? Of what is the binding and why
should it be?
Since there is not seen a knower nor any kind of sensation, O thirst!
beholding this situation, why are you not split asunder?
Sensation is seen and it is touched, but by thought [only], which
itself is like the sleep of māyā. Because of its very nature, due to
that thought, sensation is not seen.
In this birth neither that which was before not that which will be
afterwards is remembered or perceived.
It does not perceive itself, nor is it perceived by another.
There is not a knower, therefore there is not really any sensation.
Since this bundle is composed of nothing, how can one be oppressed by
it?