Book says: To rationalise the fraction , multiply both the numerator and denominator by giving: .

There is a failure to communicate there. At least a failure to translate correctly. The word rationalize does not mean strictly to make rational in mathematics-speak.
It is considered poor form to have a radical in the denominator.
Therefore instead of we rationalize that number writing it as by multiplying by .

Understood, thanks . However, why is it better to have an irrational number as the numerator instead of the denominator?

Yours is actually a very good question.
Before good calculators and/or CAS it was very difficult to divide by an irrational number (actually it still is in practice).
Consider over against which is easier to do by ‘hand’?
They are both equal. But the second is easier to work with.