It's because they keep printing more and more dollars and issuing debt, those extra printed dollars have to go somewhere and they buy more stocks with it.
https://en.macromicro.me/charts/28906/SPX500-Index-vs-Dollar-Index
People/mainstream media just assume stock market goes up means the companies are more valuable -- for the past year or so it really just means the dollar has been going down aka inflation