This was enhanced by natural selection - the seeds can pass through the gut and be deposited far away (with a nice dollop of fertiliser).
And along thse lines, and similarly to avocados' "strategy:" birds don't have taste receptors for capsaicin, the hot stuff in chili peppers. Peppers have small, sort-of-fragile seeds. And birds don't have grinding teeth. Mammals sometimes do have grinding teeth, but humans are the only mammals that will willingly eat hot peppers - because we cook them, I suppose.
Guess how pepper seeds get dispersed in the wild? And some peppers even ripen to bright colors to let birds know "these seeds are ready for transport!"