Ask your SpongeBob SquarePants related question here:

Re: When did Plankton start wanting to take Mr. Krabs formula? Add answer
The episode Friend or Foe completely explains the reason.

But in short, Plankton and Mr. Krabs originally worked together. They differed on how to work with the public, and they split up. Mr. Krabs was able to successfully create a good receipe, which Plankton then wanted.