It's difficult to really compare the price of the Steam Machine to the price of the XBox or PS5.
Typically, companies like Microsoft, Sony, and Nintendo will subsidize the pricing of their devices and sell them at or near the cost to manufacture and distribute them.
They do this because you will have to buy new games in order to fully enjoy the new console. Selling you new games for a new console on a regular basis is how they make their money.
The problem for Valve is that many of the people that would buy the Steam Machine already have hundreds of not thousands of games that they can play, and won't necessarily be buying any more games just because they got the Steam Machine.
The PS5 is $549 for the 1TB model right now. So that with 7-8 games will run about $1000-$1200 for it all, depending on the price of the games when I buy them.
Alternatively, I could buy the Steam Machine, and automatically have access to 427 of my games that are verified to run on it and I wouldn't have to buy anything else. Plus there's the additional benefit of knowing that even if they release a newer version of the Steam Machine later on, the one that I have will still be able to play even newly released games (at least until the hardware requirements outpace what the first Steam Machine has in it).