Yes, he had a hidden agenda: the books are somewhat allegorical and intended to turn the child towards Christianity, not against a particular culture.
I'd assume that the negative portrayal arose out of the conventional thinking of his time far more than anything more sinister. Which is not to say that it's palatable now.
I too loved the books as a child, utterly failing to realise their subtext until much later in life and I too would hesitate about passing them on to a child unexplained.