Ultimately, because she just wasn't a very good candidate. I've seen all kinds of excuses from the usual (racism and misogyny) to the weird (billionaires don't like her -- as if they like Bernie Sanders any better), but she had chance after chance to excel and bobbled them all.
She didn't perform well enough in debates, media appearances, and other activities to increase her initial base of support and keep those increases.
She enjoyed a short (and IMO undeserved) spike in her polling from kicking Joe Biden in the nuts in public over, of all things, busing in the early 1970s, but for the most part she just hemorrhaged support every time a camera got pointed her way.
She froze and/or stumbled any time she got a question that wasn't a softball. Anything more complicated than a smirking one-liner was just too much to ask of her.
She fell completely to pieces when Tulsi Gabbard pointed out that as Attorney General of California she WAS the law enforcement establishment that real advocates of criminal justice reform have been fighting for decades.
She looked like an idiot when she came back at Gabbard later with the Clintonite "being groomed by the Russians" nonsense.
When a US Senator and former Attorney General of the most populous state in the US enjoys a big campaign launch but then eventually falls behind the mayor of a midwest city of 300,000 in the polls, it's clearly time to pack it in.
Who knew that climbing the political ladder at the sub-gubernatorial level in a single state, through unthinking party loyalty/soldiery, wasn't nearly as difficult or complicated as trying to appeal to millions of primary voters nationwide?
Harris just wasn't ready for prime time, and kept proving it over and over.