There are such licenses, but they are not generally recognized as open source. If you are interested in background, I'd recommend looking at the OSI review process of the “Convertible Free Software License”, e.g. as summarized by me here. That license was later rejected by the OSI.
Key problems of forced-publication licenses:
Contributors are copyright holders as well. Copyright includes the right to decide whether to publish at all. Forcing publication under a particular license would effectively dispossess the contributors.
It extremely easy to accidentally become noncompliant with such a license, e.g. if I fiddle with a local copy of the software and forget to publish it at once. The open source community generally wants people to comply with the license for the good of all, not to trick them into license violations.
The Debian Free Software Guidelines (a precursor to the Open Source Definition) have gathered a lot of wisdom around them, such as the Desert Island Test:
Imagine a castaway on a desert island with a solar-powered computer. This would make it impossible to fulfill any requirement to make changes publicly available or to send patches to some particular place. This holds even if such requirements are only upon request, as the castaway might be able to receive messages but be unable to send them. To be free, software must be modifiable by this unfortunate castaway, who must also be able to legally share modifications with friends on the island.
Of course, license compliance would be the last concern for a desert island castaway. But such thought experiments are useful at finding out how a well-meaning license term can actually hurt legitimate users.
Note that if a company were to lock access to AGPL software behind such sums (which in itself is legal), I wouldn't be surprised if license enforcement foundations such as the Software Freedom Conservancy would help exercising the right to receive the source code, or if competitors of the company were to help free the AGPL modifications out of spite: what are a few thousand dollars compared to ruining their competitive advantage?
The company using the AGPL software is very limited in how they can control user's access to the source code. Their primary defense would be to not take on clients at all. This makes it very very difficult for a company to charge for access to open source software rather than for services or hosting.