That's not a bug, it's a feature :)
--null produces a 32-bit signal, which .s8 saves as 8-bit
and with the precision reduction, the audio is automatically dithered to insert
about half a bit-value of noise to prevent zinging effects from aliasing.
In the second "true silence" case, you generate the silence at 8 bit depth
so there is no reduction in precision and automatic dithering is not applied.
`sox -D ...` disables the automatic dither and you will get the silence you expected.
and `sox -V ...` will show you that a dither effect was automatically inserted before "output"
It's a common misconception.