Why strokes are treated differently than fills in modern graphics pipelines This article shows some of the issues. But basically, on the web, you have fillStyle and strokeStyle, and in WebGL you have those different ways of rendering primitive lines, but you end up needing workarounds to draw more complex lines. In CSS borders don't have patternable backgrounds, etc.

Wondering why this limitation is placed on strokes/borders, if it has some history or background on why. It seems like in many cases you want a line to have as much freedom as a "fill", such as gradients, patterns, animations, text, etc. For example, pen strokes vary in thickness all over the place, but strokes typically only support 1 width.
Modern graphics hardware draws triangles. 99% of the hardware is dedicated to drawing triangles. One percent is support for line drawing, and it's mostly for historical reasons. If at all possible, line drawing will be done using the triangle drawing hardware.