Most people follow the religion or school of their parents or their overall culture. This applies to Muslims too. But one recurring lesson in the Quran is that a believer should not have an unthinking, inherited religion. The Quran repeatedly calls people to use their intellect, follow evidence, and pay attention to revelation; even if that means departing from ancestral traditions.
The true scientist - the true believer - is always at the drawing board.
"When it is said to them, 'Follow what Allah has revealed,' they say, 'Rather, we will follow that which we found our fathers doing.' Even though their fathers understood nothing, nor were they guided." (2:170)
"And when it is said to them, 'Come to what Allah has revealed and to the Messenger,' they say, 'Sufficient for us is that upon which we found our forefathers.' Even though their forefathers knew nothing and were not guided." (5:104)
"And when they commit an indecent act, they say, 'We found our forefathers doing it, and Allah has commanded us to do it.' Say, 'Indeed, Allah does not command indecency. Do you say about Allah that which you do not know?'" (7:28)
"They said, 'Have you come to us to turn us away from that upon which we found our forefathers, so that you may have greatness in the land? But we will not believe in you.'" (10:78)
"They said, 'O Ṣāliḥ, you were among us as one in whom we had hope. Do you forbid us to worship what our forefathers worshipped?'" (7:62)
"They said, 'O Shu‘ayb, does your prayer command you that we should leave what our forefathers worship or not do with our wealth what we please?'" (11:87)
"Rather, they say, 'Surely, we found our forefathers upon a religion, and we are in their footsteps guided.'" [Prophet responds:] "Even if I bring you better guidance than that upon which you found your forefathers?" They say, "Surely, we disbelieve in that with which you have been sent." (43:22-24)
"When he [Abraham] said to his father and his people, 'What are these statues to which you are devoted?' They said, 'We found our fathers worshipping them.' He said, 'You were certainly, you and your fathers, in manifest error.'" (21:52-54)
"[Abraham said:] 'Then do you see what you have been worshipping—you and your ancient forefathers? Surely, they are enemies to me, except the Lord of the worlds.'" (26:74-76)