As I understand it a person does not actually have to be either the Democrat or the Republican nominee to run for president in the US, why then are independent candidates, at least for that position so rare? I think the US could do with a couple more independent nominees.
It’s really quite simple: Duverger’s Law.
In short, when you have elections that are based on electing a single candidate with the plurality winner taking the election, the political system devolves to a two-party system.
Even the rare “independents” in American politics are functionally Democrats or Republicans because in Congress, unless a member joins either the Democratic or Republican caucus, they have close to zero power. A centrist independent could have increased power in a near-50/50 alignment by asking for additional concessions to join one caucus or the other, but someone further out in the wings does not have that as a credible option.
At the presidential level, it's rare for a third-party candidate to get a significant number of votes and in many cases, if they do, it’s indicative of a split within the party which is often a sign of waning power by the party (e.g., George Wallace’s segregationist run for president in 1968 which presaged the re-alignment of Southern and blue-color white voters to the Republican party, largely on racial issues).