Quick quote from the wiki.
A high compression ratio is desirable because it allows an engine to extract more mechanical energy from a given mass of air-fuel mixture due to its higher thermal efficiency. High ratios place the available oxygen and fuel molecules into a reduced space along with the adiabatic heat of compression–causing better mixing and evaporation of the fuel droplets. Thus they allow increased power at the moment of ignition and the extraction of more useful work from that power by expanding the hot gas to a greater degree.
A high compression ratio is desirable because it allows an engine to extract more mechanical energy from a given mass of air-fuel mixture due to its higher thermal efficiency. High ratios place the available oxygen and fuel molecules into a reduced space along with the adiabatic heat of compression–causing better mixing and evaporation of the fuel droplets. Thus they allow increased power at the moment of ignition and the extraction of more useful work from that power by expanding the hot gas to a greater degree.