Stockinette stitch always curls. It’s simply in its nature. If you’ve ever wondered why, or whether there’s anything you can do about it, allow me to explain. First of all, think of every stitch as having two arms and a head, and bear in mind the first rule of knitting physics: the arms of the stitch will always be pulled towards the head of the stitch.
On the knit side of stockinette stitch, you can see the arms of the stitch. On the purl side, you can see the head of the stitch where it folds over and the new stitch rises up from the old. All the tension is on the head of the stitch, pulling the arms toward the point where the head folds over from front to back in a small arc.
If you looked at a cross section of stockinette stitch from the side, you would see how, like a diver on the high board, the feet will always follow the head. Each stitch head pulling up and backwards lifts the feet of the stitches. Stacking the small arcs of these stitches on top of one another increases the tension all in one direction. These stitches will curl up and toward the knit side oft he fabric until some other directional pull stops them.
Mixing up knit and purl stitches means that the heads of the stitches are on different sides of the fabric. Each stitch pulls towards the head, but the tension balances out from front to back as the arcs go in different directions. Making close to a 1:1 ratio of front pulling and back pulling stitches will make a flat, even fabric. And no amount of pulling or blocking or steaming or washing will change the essential nature of these stitches. Lining up the stitch arcs will always curl. Mixing up the stitch arcs will always lay flat.
Garter stitch alternates stitch arcs in every other row. Ribbing mixes stitch arcs within each row. Welting alternates stockinette and reverse stockinette over multiple rows and curls first in one direction and then in the other. All of these stitches will make a flat fabric and keep your edges from curling.