Don't paint them in that bad of a light.
Sega was slowly increasing the cost of license while the sales of the comic were dwindling.
Plus, Ken Penders has been dragging out a scary ass lawsuit that threatened to completely upend the ENTIRE comic industry if it ruled in his favor as it went into uncharted territory. (Does he get rights to characters he made for a licensed IP?)
It's just not worth it for Archie who doesn't have the funds to do this all.
Sega has been increasing the cost of the license to Archie for years, it's no wonder Archie wanted out. No matter how well Sonic sells, it's better for them to focus on the characters and IP they entirely own, it's just good business. For Archie, Sonic is a holdover from their 90s experiments with branching out, the one that actually really paid off in the long run.
As for the lawsuit by Ken Penders, I'm no legal expert, but wouldn't the determination of whether or not he owns the characters he created fall under the particulars of his contract? Forgive me because it's been like a decade or more since I really followed the book, but didn't Ken create just about every character from the Knuckles branch of the comic except for Knuckles and the Chaotix? And if that's true, and it's not clear in the contract that either Ken, Archie, or Sega retains ownership of those characters, then as I have understood cases like this in the past, I think it comes down to either Sega or Archie "defending" their (unspoken?) rights to the characters by making use of them. If they haven't been, or worse, they were letting Ken use the characters he created for the Sonic books in his own works, unmolested, then that might end up going in Penders favor. And that right there could've been a big factor in Archie bailing out.
Again, I'm not a legal expert, so if anyone here is and my interpretation is wrong, I will be happy to stand corrected.