The simple reason is that the study of Classics has been part of the UK education system for much longer than general "history". Oxford and Cambridge were both founded in the 11th century, a time period where Latin was the language used in the church and legal system in England. For that reason alone, its study would have been essential.
As to why the study of Classics as separate to history has continued, I expect the reason is twofold. One is simply tradition, and the fact that Classics departments are probably older than history departments. The same applies to why Cambridge teaches "Natural Sciences" rather than having explicit physics and chemistry degrees: the university and the course predate modern thinking on the division of those subjects.
As for the second reason, my gut feeling as an English person is that it's also very tied up with social class (as is everything else in the UK). Classics, Greats and PPE (Politics, Philosophy and Economics) have long been the subjects of choice for wealthy, upper class men who are funnelled from private schools (i.e. those for which you have to pay a fee to attend, often exceeding £40,000 a year) to the upper echelons of government and business via Oxford and Cambridge. As long as these schools continue to teach the subjects, there will be a demand for classics courses in the UK's top universities.
The fact that these schools teach classics themselves is a hangover from 19th century attitudes to education, in which those subjects were considered an essential part of a boy's education. I can only speculate, but I think they were (and still are, by some) considered essential as they are a hallmark of wealth and social privilege, necessary currency for anyone wanting to get ahead in politics or business. Any schmuck can learn French or maths at school, but if you know Ancient Greek or Latin, that's a sign that you had an expensive education.
So, in summary, Classics departments in universities are a result of the age of the institutions coupled with the fact that these subjects were and still are taught in (private) schools as distinct subjects.