During the last years, I have observed some confusion in discussions in many societies across the globe, and that is the mis-interpretation of being something legal with something right. As I will explain below, these are two different subjects with different criteria which do not lead to each other necessarily.
Let me start with legality. The social laws or contracts which form the legal system are based on some local statistics or reasonings which change over distance and time . There are two main characteristics for social laws/rules/contracts, first, they are not universal, that means, they change in different countries. So the regime of validity of each legal system is bounded to its geographic borders. For example, speed limit in Germany is different from speed limit in Canada. Second, they are minimal in the sense that they form (or should form) a minimal set of rules to keep a society peacefully together. That is to say (roughly), legal system is mostly concerned with the actions which would involve the whole or part of a society and not an individual. However, this is not exact, for example, Marijuana does not necessarily involve others but it is illegal. We should never forget that legal system is determined by people/politicians, who might make some decisions in affection of their beliefs, which may not necessarily fit to general criteria of a legal system.
Hence, by definition, many aspects of individual life of every person in the society is just outside of the regime of interest of the legal system. For example, when we say that dating of a mature man and woman is not illegal, it only means that, the legal system does not have anything against it, but it does not mean that it is a good thing or a bad thing. It means that, legal system is silent about it, since it is outside of its regime of interest. So, we should not be confused between legal and right. For example, drinking alcohol (more than a certain threshold) is wrong for many scientific and non-scientific reasons, but as long as it does not interfere with others freedom, it is legal.
Previously, when the society was dominated by religion, in addition to the legal system, there was religion which would determine if something is right or wrong. Most religions, mostly cover the individual life which is not primarily covered by the legal system. For example, getting married is legal, but it was wrong for priests. Or pig products are legal, but it is wrong for a Jewish to eat pork. So, as we can see the righteousness and legal system do not necessarily fall into each other’s realm. Roughly speaking, the legal system and religion together determine what is right or wrong for people in the society and individually, in general.
My point from this post is that, just something not being illegal does not make it right, particularly about individual actions. Even something being legal does not make it right either. For example, using dark glassed windows in the house is not illegal almost everywhere, but it is not necessarily right. Hence, the righteousness has almost nothing to do with legality, since they do not share the same criteria. One particular feature of righteousness is that it is almost universal and does not depend on border lines.
The main question is that, now that religion is not dominated in most countries, what determine righteousness of an action? For some people, religion is replaced by science. At first, this may sound good, but it has many problems, one of which is that, it changes over time so frequently and so fast. In a sense, it is unstable. This instability is a good thing for the sake of science, but for being a touchstone, it is not a good option, I believe.
Hence, what else left? I think, this is one of the main reasons behind the fact that many people still would rather keep their religion beliefs; because there is no good replacement yet. Almost every mature and open minded adult can see the deficiencies present in the religion, whatever religion it is, but, there is nothing close to it. I should also mention that several mandates of any religion have their roots into the mental evolution of human being which is the legacy of human evolution and it deserves special attention. I will talk about my ideas about the evolutionary morality in the feature posts.
 I tried to find out how a bill is prepared for legislation, for example in the US. So far, I have not found anything. It seems that any member of the house or senate can write the bill they want and introduce it to the congress.