A big part of the reason for useless Gateway was that NASA wanted post-ISS missions, but was too afraid to roll with a permanent Moon base instead. The other big part was that Orion sucked, and somehow, neither "get Orion to suck less" nor "roll with Orion, provision for HLS to do more" was in the cards. This only changed under Isaacman.
For every Curiosity and JWST, there's ARM and Artemis. It seems like it's getting better now, but very slowly.