It's a browser setting. For example, I'm using Firefox 41 on Windows 7 and in Options->Content->Fonts&Colors/Advanced... it has "Times New Roman", "Arial", and "Courier New" as the defaults for Serif, Sans-serif, and Monospace respectively.
In Chrome, it's under Settings->+Show advanced settings->Web content/Customize fonts... (Times New Roman, Arial, Consolas on mine.)
In IE 11 under Tools (gear icon)->General->Appearance/Fonts it has "Webpage font" and "Plain text font" (Times New Roman and Courier New on mine). It's weird that they don't let you pick the default sans-serif font.
The 'sans-serif' font is an alias for the default sans-serif font, which is simply a system setting just like the default browser or the default whatever. Therefore the system doesn't need to know which fonts are sans-serif and which aren't.