Why is there no A/AN before the word pepper?
I bought pepper.
Why is there no A/AN before the word pepper?
I bought pepper.
We use the indefinite article "a/an" before countable nouns only.
The word "pepper" can be either countable or uncountable.
If it's countable, it means the individual fruit of a capsicum plant, like these four:
If "pepper" is uncountable, then it means peppercorns, which are the fruit of the black pepper plant, either whole or in ground form, like these:
So "a pepper" means the first type, and without "a/an" means it's the second type. So in your example sentence, we know they bought black peppercorns or ground black pepper.
In general, "a" implies a quantity of 1.
If you buy one whole pepper (🌶️), you have bought a pepper.
But "pepper" can also be a mass noun, when referring to ground pepper (as a spice). You might measure it in grams. Here the indefinite article is not used:
I bought pepper.
I bought some pepper.
I bought 1 gram of pepper.