The main function of hydraulic piston seal kits is to prevent the hydraulic fluid from escaping the system, which can lead to a loss of pressure and efficiency. By creating a tight seal around the piston, these kits ensure that the fluid remains contained within the system, allowing for smooth and reliable operation of the hydraulic equipment.