I do not support the parts where non belivers ae getiing slandered within some religious texts, And ofcourse i can not answer for every text ever written in every religious books, but my thought is that where there is evil writings within holy books, human hand and mind can have a cause for this. It might be that some human being has written this thing out of his/her own thoughs and not from what the teacher (God) actually did mean. But i can not prove that, so do not take this post as a solid evidence for why some words in holy books are like that. It is only my thought about it
It is said they were authored by a god so it's not possible for you to answer,if not authored by a god it must be by a human, if by a human then the rest of the religious texts may be authored by humans too which is where I'd put my money but that's only my thoughts about it.