If you have a source of VOCs in your room or building, it may make sense to open a window to release them. Most air purifiers, unless equipped with carbon filters, do not filter out VOCs and only capture particulate pollution. In such a case, opening windows may to release the VOCs from indoors.
Another situation you may want to open windows is when you have a high occupancy indoors and CO2 levels are high. For example in a school or in an office. Opening a window can help reduce indoor CO2 levels, which has some positive benefits. For example, lower CO2 levels may reduce drowsiness and improve thinking skills, which may be beneficial in offices or schools.