Cats kill birds out of nothing but instinct, they don't do it if they're hungry, domestic ones that is. They do it out of desire, fun, adrenaline and whatever else you can think of that describes impulse reaction.
They bring it in to show you, if you spray them, they learn that is wrong to a certain degree. OP did right thing.