The use of shims is primarily used to level the countertop. It is not good for countertops to be out of level, so shims can help hide any level defects in the cabinets.