The registers of a real time clock chip generally store the time to a resolution of one second only. There must be a 1/32768th counter or divider internally, but it cannot be read or written programmatically.
hwclock attempts to get sub-second accuracy by reading the time repeatedly until the seconds just change. When writing the RTC, it does so at a system time that is an odd multiple of half a second. The MC146818 chip used in the IBM PC/AT effectively set its sub-second counter to a half whenever the seconds were updated.
However, DS3231 appears to clear its sub-second count to zero when the time is set. So the hwclock -w behaviour introduces an error of -0.5s. This is rather unfortunate, because DS3231 is one of the few RTCs with accuracy better than 0.5s/day.
There is a version of hwclock that can do "hwclock --systohc --correct=0.5": http://giraffe-data.com/software/about_hwclock.html