When we talk about the giraffe to refer to giraffes as a class, we are essentially talking about a conceptual giraffe rather than a concrete giraffe. It is referring to the class itself. Thus, we can say
The giraffe evolved around one million years ago.
But we cannot say
The giraffe would be a strange pet
At least, unless we're talking about a specific giraffe.
When we use the indefinite article, using a giraffe to talk in general terms, we are speaking of an arbitrary giraffe. It is a concrete giraffe, but it is not a specific concrete giraffe. Essentially, it means "any given giraffe". Thus, we can say:
A giraffe would be a strange pet
But we cannot say
A giraffe evolved around one million years ago
At least, not unless you have a funny idea of how evolution works - and even then you wouldn't be speaking in general terms any more.
In both of these cases, it's important to distinguish between the general, non-specific usage and the specific usage. Both the and a can be used when speaking of specific giraffes as well. The difference here is about how they are used to make general statements about non-specific giraffes.