@Tesseks it's a matter of elections in the US being run by states and subject to state laws primarily.
Each state has slightly different rules regarding who can run and how ballot access is managed. They also have different court systems and processes to adjudicate stuff like this.
In the end, in general, a person is able to run in respect for voters being able to cast their ballots as they see fit.
Beyond that, each state restricts the process differently.
One thing to emphasize is that just because someone wins an election doesn't mean they get to hold office. If voters want to elect someone who's ineligible to actually take office, the state systems might be happy to let them vote that way.