Some but not all of the reasons: It's virtually impossible for a primary candidate to unseat an incumbent in their own party, and gerrymandering makes it so that opposing parties rarely have solid candidates.
Same for there simply not being another candidate most of the time. If you have a 70% conservative / republican county or state, running democrat doesn't make much sense, and is an especially bad investment for any donors.
You might call it regulatory capture of democracy.