The correct answer is B. Bacteria. Restriction endonucleases are enzymes that are primarily produced by bacteria. These enzymes are part of the bacterial defense mechanism against foreign DNA, such as viral DNA. They recognize specific DNA sequences and cleave the DNA at or near those sequences. This activity helps protect the bacterial cell from potential harm caused by foreign DNA. While some enzymes with similar activities are also found in other organisms like fungi and plants, restriction endonucleases are primarily associated with bacterial systems.