There might be some changes in various religions but it is always correct that all religions want good things for people and restrict those things which are a bad impact on human life. As gambling has a bad impact on human life it has been restricted.
These may seem like good reasons to explain why religion prohibits gambling absolutely, but compared to other prohibitions, the reasons may not seem entirely valid, and the prohibition may have been due to influence by one of the ancient myths or because of a historical event that led to that. The evidence for this is that gambling activities have not stopped in religious societies that prohibit gambling, and perhaps more so than in others, according to the principle of “whatever is forbidden is desirable.”
I will give you an example: If we consider that the Islamic religion, for example, forbids gambling and alcohol because of the complications that they can cause, at the same time we do not find an explanation with the same logic about the reasons for Islam’s prohibition of eating pig meat or the prohibition of adopting children who lack a bond. All of these taboos are still highly controversial.