Cucurbitacin, a chemical in cucumbers, is responsible for its bitter flavor. Typically, cucumber plants' leaves, stems, and roots contain cucurbitacins. However, when plants are stressed, cucurbitacins spread from the vegetative sections of the plant into the cucumber fruit. As a result, cucumber tastes bitter.