Yes, raw onion paste can cause bitterness if not cooked properly. The sulfur compounds in onions, when not fully broken down by heat, contribute to a sharp, bitter taste.
Raw onions contain sulfur compounds that, when the onion is cut or crushed into a paste, are released and can create a pungent and sometimes bitter flavor. Cooking onions properly, especially when in paste form, allows these compounds to break down and transform into sweeter, more palatable flavors. The heat helps to convert these harsh compounds into sugars and other flavorful molecules. If the onion paste isn't cooked sufficiently, these sulfur compounds remain, resulting in a noticeable bitterness in the final dish. The duration and intensity of cooking needed depends on the type of onion and the desired flavor profile. Generally, cooking until translucent and slightly golden is a good indicator that the bitterness has been reduced.
To reduce bitterness in onion paste, try adding a pinch of sugar or a splash of vinegar during the cooking process. These ingredients can help to neutralize the sulfur compounds and enhance the sweetness of the onions.