Most people who use marijuana do not go on to become addicted to harder drugs. Even for those that do go on to use harder drugs, it cannot be determined that marijuana use is a precipitating factor. The correlation could be showing that the things that drive someone to use marijuana or alcohol (boredom, depression, or their social circle) also drive people to harder drug use.
Even if marijuana is a gateway drug, there is also research that both alcohol and tobacco increase the likelihood of using harder drugs.
It doesn’t make sense to use the gateway argument as a rationale for marijuana to be illegal when alcohol and cigarettes are both gateway drugs and are legal. In fact, most users of harder drugs begin with alcohol and cigarettes before moving to marijuana and then additional drugs.
This shows that marijuana isn’t the first or most predominant gateway drug.