Yeah, it'll work without the shims, but it'll perform and last better WITH them.
See, the piston is flat on the INSIDE of the caliper, but the contact surface on the OUTSIDE is 'hollow'. The piston is usually polished, then plated, then polished, to yield a smooth seal surface and high corrosion resistance, and usually, it's made of fairly good material, but not incredibly hard steel. The backing of the pad is usually fairly malleable steel, and not work-hardening, because the pad gets hot. The shim is spring steel, and usually, it's plated, or just really, really, really hard.
Without the pad, the caliper's edge surface starts to impress into the pad, by virtue of several circumstances- first being corrosion- the brake going from hot to cold, to hot to cold, means that moisture appears, then leaves, then appears, then leaves. The contact point between piston and pad is DISSIMILAR metals, which means presence of moisture causes galvanic corrosion. Eventually, that corrosion digs a little 'circle' in the pad, and as noted above, rotation of the wheel causes the pad to deflect one way... brakes wear unevenly, piston contact becomes unbalanced, and the pad vibrates.
With the shim in place, corrosion doesn't happen around the edge of the cylinder, it's evenly distributed along the shim surface, and if there's any of that 'brake grease' or shim adhesive in there, it displaces moisture.
Next... heat doesn't like to go through layers of different materials... passing from one material to another constitutes 'insulation'... which means brake pad heat doesn't wind up going directly into the piston and heating the seals and fluid so quickly.
Frequently, that shim is made with a 'spring' portion that will help push the piston back into the caliper on a release, so the piston doesn't exhibit the propensity to bind the pads along their guide flats.
So the short of it, you can run without 'em, but you'll like it a whole lot better, and the brakes will last you longer, if that shim is there.