Why are there bitter bits in my cake?
It may have been baking powder but it doesn't matter what it was.
Cake methods produce a homogeneous batter. There shouldn't be lumps of anything.

The sugar is creamed with the butter until it is smooth. The dry ingredients are mixed together and most recipes call for sifting them into the wet to prevent exactly these kind of lumps. I will admit that, unless my dry ingredients are obviously clumpy, I will often skip the sifting step to save another utensil to clean.

Make sure that you scrape down the sides of the bowl to ensure there are no unincorporated ingredients.

Some baked goods, like pancakes or biscuits, intentionally under mix to keep things tender. Cake instead relies on low protein flour and lots of fat to keep things tender and the batter should be completely blended.