The battle with Yu Yevon is just an added effect for the suffering of Spira in general, it is indeed part of the ending. It is simply extra things to add to the reason of the whole plot. Yu Yevon an entity, the embodiment of sorrow. And thus he is destroyed for good. Torn down to a million pyreflies as it should have been a thousand years in the past.