When converting a color JPG image to grayscale, and saving it back to JPG, one can usually see at least 20% file size reduction, which seems natural.
Question:
A color JPEG has 3 components: Y Cb Cr
A grayscale JPEG has 1 component: Y
You can convert a color JPEG into a grayscale simply by updating the header to indicate 1 component and deleting the Cb and Cr scans.
Is there a specific "grayscale" format in the JPG specifications?
Yes, and it is well supported. It isn't used commonly these days, but most everything can read it.
Or is a "grayscale JPG" just usually a color RGB JPG where R value==G value==B value, and thus the file size reduction results from a compression of 3-times-duplicated numbers?
Not all APIs are going to expose all of the features available. The greyscale handling is specific to the format and isn't available in all other formats. The Canvas API, in particular, tries to standardize over all possible export formats. Therefore, only a subset of features are supported.
When you save an image via the Canvas API, it's likely that you're saving a JPEG with chroma components, and they are effectively null and are compressing well. (That being said, the specific behavior is undefined, and a browser could choose to optimize and save a greyscale JPEG by detecting greyscale is all that's required.)