The one function of the piston seal is to stop brake fluid from leaking out of the caliper.
The other function of the piston seal is to pull the piston back and therefore release the brakes.
The brake fluid under pressure forces the piston to slide out of the caliper. This action deforms the seal in the direction the piston travels. When releasing the brake pedal the deformed seal will pull back to its original shape and pull the piston with it, this action will release the brake pads from the disc.