Well, Kirby does have a main enemy, you heard of Dark Matter? well here he is anyways.
Unlike Dedede, Dark Matter is actually evil, Dedede's dededeeds include ,stealing food twice, saving PopStar even more so and sometimes just sitting back and doing nothing. Dark Matter, spread hatred, attacks innocents, and most importantly to the discussion... possesses things, primarily Dedede, Dark Matter made Dedede do the evil deeds he has done in Dream Land 2/3 and 64, look it up it's canon.... and he's not the only character to use Dedede as a pawn, characters like Yin Yarn, and someone I won't spoil from a 2013 Kirby game have also took control of Dedede for malicious reasons.
Back to Dedede I got a little excerpt from the Kirby wikia.
"Nintendo has described Dedede as Kirby's "arch frenemy,"
and as he has helped more than harmed him since Kirby's Return to Dream Land, it is debated whether or not Dedede is an antagonist any longer." Basically Dedede is now more of a rival nowadays, he does good but still likes to compete with Kirby. heck in Super Star Ultra it's said that the Masked Dedede fight is to settle their differences once and for all, Dedede loses this and ever since then he's never done anything malicious.