It was right after the Horus Heresy, after the Space Marine Legions had been traumatized and dishonoured by half of them turning against them. After such an event, they had to be dealing with doubts and despair; preventing a repetition of such an event had to be pretty much the highest priority point on their agenda. The Codex was, to a large part, written to redesign the Legions into something where the Heresy couldn't repeat itself. Hence Guilliman didn't have to force them into compliance - for the most part, in their shame and desperation, they accepted the Codex quite willingly - partially, probably, as a sort of penance for having allowed the Heresy to occur. And by the time that state was over, the Codex had already ingrained itself into the Space Marine identity.
Or that's my interpretation of all of that, anyway.
Question of my own. I recently started reading Fulgrim for another time, and while doing so noticed that, on the cover, there is a depiction of a Dreadnought. I also recall that there was at least one Dreadnought featured towards the end of Galaxy in Flames.
Now, this seriously irritates me, because I'd have thought Dreadnoughts were something that came up only after the Heresy. Every codex containing Dreadnoughts keeps emphasizing how Space Marines are pretty much only interred in Dreadnoughts under the most dire circumstances, so there appears to be a serious reluctance to subject warriors to this fate. It makes sense though - after all, ever since the Heresy, Space Marines are in rather short supply for all the chapters, so preserving them in this fashion may, at times, just be necessary. The Legions though, before the Heresy and the civil war it entailed? They didn't have such a massive shortage on men - why would they have to make use of such an option?
(Also, if Dreadnoughts were always used, how come none of the Dreadnoughts from before the Heresy have survived? Bjorn the Fell-Handed is explicitly stated to be the oldest one of them all, and he didn't become a Dreadnought until long after the Heresy - one would think that if Dreadnoughts were actually commonly used even back then, at least some would have survived by sheer coincidence.)