The 20,000 figure is a known thing.
That is, there are penalties for having a treasury higher than that. The first one (alluded to in this old thread) is a tax or some other income modifier that remains in place until below 20K.
The "solution" to the 20K figure is to buy an improvement or a ship to get under 20K before you end the turn. Oh, be sure to move all your survey ships, though, even if you have to do it manually. If they find a cash anomaly that puts you back above 20K, you will get the effect even if you bought down to get just under it.
That is not the only penalty, however. Any time you end a turn above 20K, you have some probability of one of two or more special negative events.
One of the "events" is a notification that someone is stealing money. Another, IIRC, is that there is embezzling going on or something like that. If you get that notification, you will see a progressive reduction in revenue. I forget what you have to do to get rid of the effect. maybe some old thread will tell. I just keep the treasury under 20K, even if I have to GIVE away some to an ally or minor AI, or use it to buy some trade good, etc.
(I play DA, so this applies to DA for sure. I think it applies to TA, but am not positive.)