Although commonly 'a' would come before a word starting with a consonant, in this the case the 'U' in university is pronounced as a long vowel (yew), which on the phonetic chart would be a j. Another example of this would be 'a unit of measure.' This is contrary to say, 'an umbrella', as the 'u' in umbrella is a short vowel.