U.S. citizens traveling to Cuba through Mexico or any other country besides the U.S. are still required by law to abide by the U.S. regulations for Cuba travel.
The practice of traveling to Cuba through Mexico, Canada, or another country was used in the past before Cuba travel was legally possible without applying prior to travel and before there were direct commercial flights that anyone could purchase. The tactic didn't make it legal to travel to Cuba, but rather was a way to skip the application process and evade detection by the U.S.
Now that both of these restrictions no longer exist, it is much faster, safer, easier, and less expensive to travel directly to Cuba from the U.S. It's completely fine to travel through a third country, but this doesn't exempt the traveler from abiding by the rules in Cuba, and may actually end up increasing suspicion or scrutiny on the traveler by U.S. Customs and Immigration, since the practice of traveling to Cuba through a third country is widely known.
For more help with answers to Cuba travel questions, ask one of our local Cuban planners!