To be (somewhat) fair, those Operating Systems were intended to run on standalone consumer machines that weren't permanently attached to a network. The most likely means of getting infected with a virus/malware back in the Win95 days was via the floppy drive.
Though always-on internet connections was clearly the direction things were moving toward the end of the 90s - there was no excuse for going back to the trough with WinME rather than pushing everyone to NT.
Who could forget the login bypass "hack": https://i.imgur.com/rG0p0b2.gif
Boot a Linux usb live boot of choice, mount the Windows C: parition. Rename the Command Prompt exe to be the accessibility or sticky keys exe (something roughly along those lines). Save and reboot into Windows. Hit the on screen keyboard button on the login screen and an administrator level command prompt opens allowing you to reset the local admin password to be able to log in or do anything else that you would like to do.
and on most PCs you don't need secure boot to block booting from USBs, a BIOS password is usually enough...
This is only part of the story but functionally it was the same. Also 95/98/Me were woefully insecure. And they didn't take security seriously until it started getting really bad mid-2000s.