Well Windows 7 (and Vista?) had it by default but it was pretty useless. Basically a user-friendly GUI to the firewall with very basic anti-virus. Microsoft released Microsoft Security Essentials (MSE) which was the precursor to what we see now built into 10. It’s come a long way.
Back in the XP days it was a veneer on GIANT AntiSpyware which as I recall was viewed as a separate component to anti-virus back then. As things evolved you saw combined firewall/anti-spyware/virus/adware from companies like Norton/Symantec and as you note MSE was really MS's anti-virus entry in Vista & 7.
Nowadays 'anti-virus' subsumes all those products into one unified thing.