Most fabrics shrink during their first wash. During production they are usually chemically treated to give them a nice aspect and to stiffen them. During the first wash, most of this treatment disappears and the fabric recovers its initial aspect and size. Some materials like cotton or polyester don’t shrink that much, however wool and linen considerably do. If you had sewn your garment with a unwashed fabric it would have shrunk during its first wash.
Quick tip : when you buy your fabric, add a margin to the recommended measurements to compensate the shrinking.