I sort you into houses
Because that is what I'm for,
But this year I'll go further,
Listen closely to my song:
Though condemned I am to split you
Still I worry that it's wrong,
Though I must fulfil my duty
And must quarter every year
Still I wonder whether Sorting
May not bring the end I fear.
Oh, know the perils, read the signs,
The warning history shows,
For our Hogwarts is in danger
From external, deadly foes
And we must unite inside her
... ...
Harry Potter and the Order of the Phoenix
I don't understand the part in bold above. What end does Sorting (he fears) bring?