Those are instincts bred by evolutionary because they're vital for survival. Recognising an elephant is not the same thing for us. Instead, we get a generic toolbox for quickly learning to recognise very different objects, from animals to machines to abstract shapes. We're not born being able to recognise them, but we can pick them up very quickly from even rough descriptions.
So, while this pattern in particular doesn't apply to humans (it really doesn't?), many animals have ready-to-use pattern recognition when they are just hours or days old.