What is the point of refining ore or herbs?

I am having a hard time understanding the point of refining ore or herbs. 5 Khaz ore rank 2 = 1 khaz rank 3. You can sell your 5 rank 2’s and be able to buy 2-3 rank 3 ore for the price of 5 rank 2 ore. I am not seeing a situation where its not worth just selling and buying the mats on the AH. Am I missing the point here? I just cant see a situation where it makes sense to do this and even 1/2 of our whole tree is based around this.

You know…I have no clue. My gatherers go the long way and like my herber can get like 10+ 2 quality Hochenblume per pick. I guess if I wanted to waste of the 2 quality but there’s no reason too.