C6H5CO2H dimerization in Benzene
In polar solvents such as water, the water molecules will solvate the carboxylic acid. Thus, hydrogen bonds will form between the 2 molecules and the carboxylic acid will dissolve.

The water is in large excess as it is the solvent so it will solvate most of the carboxylic acid molecules.

In a non-polar solvent such as benzene, no such hydrogen bonds can take place with the carboxylic acid and benzene molecules. As a result, the carboxylic acids simply interact with themselves and form dimers.