The Switch has its disadvantages over a Steam Deck obviously, it could never run as many games so well and doesn't have access to such a big game library.
But its true these are essentially different products, without Switch there may not even be a Steam Deck today, and launching a dedicated gamming device supporting it with quality software over many years is a massive undertaking, at the end what Nintendo offers are high quality games developed exclusively for a portable, wich is very healthy for this industry imo. Simply launching hardware is not the same thing, (although convenient for people who want to play PC/Gamepass and other stuff on the go)