They don't ship with windows btw.
C64 was still shipped with Microsoft's user interface solution. Microsoft Windows follows Microsoft Basic's OEM business model.
For user interface, there are plenty of 8bit micro-computers with shipped Microsoft Basic.
Microsoft's early success wasn't fluke.