It was its HP. Sturdy doesn't negate Endeavor, nor does it fail on Level 1 Pokemon. At Level 1, Pineco has a HP of 12, without EVs and 31 IVs. Togedemaru also has same. Assuming that your HP was equal or greater than that of your target, that's why it failed.