Have you got a cold?
Have you got flu?
Have you got the flu?
Why can't we say a flu or the cold in the previous examples?
We can precede cold with both a and the when we make a generic reference, as in ‘A cold can be difficult to get rid of in the winter’, and ‘The common cold is found everywhere in the world.’ In conversation we use a cold when we introduce it as a new topic of conversation (‘I’ve got a cold’), but the when we refer to it once it’s been mentioned (‘How long have you had the cold?’)
The reason why we say, or can say, the flu in contexts where we have to say a cold has its origins in the word’s history. Influenza is an Italian word having the basic meaning of ‘influence’, but which came to mean ‘visitation’ and ‘outbreak’ and then ‘epidemic’. Its first recorded use in English was in 1743:
The definite article has been possible ever since. In actual fact, influenza occurs mostly with the zero article, as this nGram shows.
Because there are many colds, but only one flu. The flu has always been considered a disease, but it is only very recently that the cold has also been considered so. Originally, catching a cold was believed to be just something that happened to you based on enviromental conditions - like a headache. Even now, worried parents will warn their children that if they get cold and wet, they are likely to catch a cold, which we now know to be entirely incorrect.
So every cold was a separate thing, unique to the person who had it - saying "I've got the cold" would be like saying "I've got the headache". A case of the flu on the other hand was NOT separate, but a part of the larger flu outbreak.
The way articles are used in English is basically unpredictable. We just have a sense that some words require particular articles and some require other ones and some require none at all. They defy any attempt to find a logical pattern.
This isn't a satisfying answer, but it's all we've got. Why do we say "going to the Amazon River" but "going to Lake Ontario"? We say "a hernia", "the bends", and just plain "emphysema".
Update: You'll notice in the comments that people keep trying to make up rules to explain this, but the rules are either correct as often as they're incorrect or just list the cases and say what happens in each case. There's simply no pattern to it.