It is an artifact. Artifacts have rules powerful enough that gods find them troublesome to work around. This particular artifact's rules say:
Before you draw a card, you must declare how many cards you intend to draw and then draw them randomly [...] Any cards drawn in excess of this number have no effect. Otherwise, as soon as you draw a card from the deck, its magic takes effect.
It says you must declare how many cards you intend to draw, then draw randomly. If you do not do this specific ritual, drawing cards from the Deck has no effect at all.
If your party decides to play poker with a Deck of Many Things, all you've accomplished is tempting fate ("the GM"); technically, the artifact is completely inert the whole time. Just make sure nobody ever deals to themselves.
Likewise, if you look at the deck, you can tell whether it is a 13 or a 22 card deck. And you can stack the deck, if you want. But if you stack the deck, and declare "I am going to draw one card", then do so... You haven't satisfied all the prerequisites, so nothing happens.
Similarly, while nothing says you can't separate the deck, if you remove the bad cards and try to draw from a deck only containing good results, it is not "a deck of 13 or 22 cards" anymore, so nothing happens. By the same token, you also cannot weaponize the deck, say by slipping the BBEG the Balance card (flips alignments**) or Ruin card (lose everything you own) in an envelope and trying to trick them into saying "I draw one card". No such shenanigan can work.
** Turning them into the Big Nice Good Guy would be nice, wouldn't it? Alas...