Because it’s often exactly what their god supposedly commands.
If anyone secretly entices you—even if it is your brother, your father’s son or* your mother’s son, or your own son or daughter, or the wife you embrace, or your most intimate friend—saying, ‘Let us go and worship other gods’, whom neither you nor your ancestors have known, any of the gods of the peoples that are around you, whether near you or far away from you, from one end of the earth to the other, you must not yield to or heed any such persons. Show them no pity or compassion and do not shield them. But you shall surely kill them; your own hand shall be first against them to execute them, and afterwards the hand of all the people. Stone them to death for trying to turn you away from the Lord your God, who brought you out of the land of Egypt, out of the house of slavery. Then all Israel shall hear and be afraid, and never again do any such wickedness. —Dt. 13:6
When you draw near to a town to fight against it, offer it terms of peace. If it accepts your terms of peace and surrenders to you, then all the people in it shall serve you in forced labour. If it does not submit to you peacefully, but makes war against you, then you shall besiege it; and when the Lord your God gives it into your hand, you shall put all its males to the sword. You may, however, take as your booty the women, the children, livestock, and everything else in the town, all its spoil. You may enjoy the spoil of your enemies, which the Lord your God has given you. Thus you shall treat all the towns that are very far from you, which are not towns of the nations here. But as for the towns of these peoples that the Lord your God is giving you as an inheritance, you must not let anything that breathes remain alive. You shall annihilate them—the Hittites and the Amorites, the Canaanites and the Perizzites, the Hivites and the Jebusites—just as the Lord your God has commanded, so that they may not teach you to do all the abhorrent things that they do for their gods, and you thus sin against the Lord your God. —Dt. 20:10
The Quran does a little better, in that it doesn’t explicitly command genocide and even tells you not to start hostilities. (“Little” is rather an understatement) But if those infidels start shit? Kill them all!
Fight in the way of Allah against those who fight against you, but begin not hostilities. Lo! Allah loveth not aggressors. And slay them wherever ye find them, and drive them out of the places whence they drove you out, for persecution is worse than slaughter. And fight not with them at the Inviolable Place of Worship until they first attack you there, but if they attack you (there) then slay them. Such is the reward of disbelievers. —Sura 2:190