It is interesting though. Why would a plant evolve to kill animals when the purpose of a berry is to spread seed through consumption?
Birds tend to travel farther during any given time period than (typically terrestrial) mammals do, making them better at spreading seeds over a wide area. So it's evolutionarily advantageous for plants to optimize their fruits to be eaten by birds instead of mammals.
That's not the purpose of the berry. The purpose is just to ensure the survival of the seed. In drought-stricken environments, the seed is probably better off keeping its shell of water and fructose until it can form a root system.
For other plants it may be advantageous to be poisonous to one species and not another