Q: Why was the sewing machine so funny?
A: It kept everyone in stitches!
Explanation: A sewing machine is used to make shirts, pants and anything made of fabric that needs to be sewn. When the sewing machine does its work, it makes stitches that hold two pieces of fabric together. To “keep someone in stitches” means to keep someone laughing.
This joke plays with the word stitch: the work that a sewing machine does and the idiom “to keep someone in stitches.” That is why it is funny! (Did you notice the title- a seam is where two pieces of fabric come together.)