The egg acts like a binder in the spinach cottage cheese mixture so it firms up as it bakes —  instead of running out of the shells.