Every website used to be like “www.example.com”. Now I rarely encounter this “www.”. Why did it even exist and where has it gone? I also used to run into websites with legitimate domains, but “ww1.” instead of “www.”, these were probably phishing sites, but how did this actually work on top of legitimate domains?


Well it’s a subdomain. You could have www.example.com and ftp.example.com go to the same computer, or you could have a load balancer direct www to multiple computers. But it’s helpful for keeping stuff organized in your configuration to give them different names based on what kind of content and/or protocol they’re serving out.
Google does a pretty good job at this where it’s mail.google.com for gmail, www.google.com for their search, and if you’re logging into any google account, it’s something like accounts.google.com. That way you know which company you’re exchanging information with from the domain name, and the subdomain tells you which service you’re using. Helpful if you want to make sure it’s not a phishing site.
Load balancers were uncommon in the 90s fwiw
Sure but even with load balancers, it makes a lot of sense to use subdomains to route data.