Why do publishers allow distributing preprints? I recently wanted to read one conference paper and one journal article. The conference paper is named Division by invariant integers using multiplication. By clicking on the "All 9 versions" link on Google Scholar, I found the full paper on gmplib.org.

The journal article is named improved division by invariant integers. It is also available at several sources as PDF.

Why do publishers allow such redistribution of papers / preprints? I mean, if everyone is doing the same as I'm doing, the main revenue source of publishers will go away. Is it because publishers obtain their main revenue from university libraries? If I can't find a PDF preprint of an article, the next thing I'm going to do is to try to find the article through my university library.
Although this is speculation since I don't work for a publisher, there are a couple of reasons I can think of:


Due to pressure from funders, who want the research they funded to be publicly available.
To take away the focus from gold open access. Publishing preprints is known as green open access, and means that authors are allowed to post their work elsewhere. Often, however, this is with restrictions: only the non-peer reviewed version is allowed, and only after a certain period. This discourages academic libraries from cancelling their subscriptions, and appeases the funders who might otherwise call for the published version to be publicly available immediately. (Note: I think this was mainly a motivation before the publishers figured out they could heavily charge funders for the latter requirements.)
Because it might be hard to argue in a legal case for publishers to restrict access to research that they haven't been involved with at all (i.e. not yet been peer reviewed, layout done by the researcher themself, etc.). Yes, they often coerce authors in transferring copyrights to the publishers, but they might rather not test the strength of that argument in court.
As a courtesy, to maintain goodwill. It's clear now that it doesn't really threaten their business model (no subscriptions appear to have been cancelled in response to preprints being available), so they can easily do this.