There are various reasons for referral. Your vet may have made a diagnosis but feel that your pet would benefit from specialised treatment from a specialist with more experience in that condition.
They may also be unable to make a diagnosis and feel that a specialist opinion is necessary. In some cases, specialised facilities are required for diagnosis or treatment, which may not be available at a regular practice. A recognised specialist is the most qualified vet for a referral.