Given the nature of game-as-service and the fact Artifact sold poorly, it's no surprise Valve pulled the trigger. People can say they did not advertise properly or the game required more development but I believe Valve ran the numbers of best-case scenery of a new card game on a saturated market and decided it was not worth the hassle. If A game like TF2 is on life support what chances Artifact have?
I also think the morale of the team was pretty low in working on what is for all purposes a dead game and I am sure most of the team just wanted to finish it and move to another project.
I am glad they gave it a 2nd chance, mostly because I believe somewhere at Valve there is an executive order saying you can't spend time and money on vanity projects which will never see the light of the day. You finish what you started and release a finished product, even if it's one that will not push numbers. Both Underlords and Artifact were completed which is progress compared with 10 years of nothing we had.