I've bought cheap pistols before.
These have almost all been cheap (meaning inexpensive) in just price and many have been former military pistols and were sold as surplus though. The vast majority were just to try out.
Some of them in rough order or purchase ...
• Hungarian FEG Femaru Mod. 35 .32 ACP (starting in 1989)
• Star Model B 9mm
• Jennings .22LR that I bought for $20 or $30. Don't even remember what happened to it. Sold it or gave it away. Just wanted to try it.
• Intratec 'CAT' .45 ACP (trigger like a handweight). Traded it as a partial trade for a CZ-75. The rest of the trade for the CZ-75 was made up by the S&W 19 further down the list.
• Ithaca 1911 from WWII that I bought for $200.
• CZ-27 .32 ACP
• Spanish Astra Mod 400 9mm Largo
• Spanish Astra .22LR revolver
• Phoenix Arms HP-22 .22LR (traded this for the Llama double stack .45 ACP)
• Llama double stack .45 ACP compact. This plus a bit of cash got traded for an H&K-4 pistol with 3 barrels (which put it over the $300 line).
• S&W Mod. 10 .38 Special back when they were $100. (Wish I'd bought several).
• Two Loricin .22LR pistols that I bought for $20 each (two of the few on the list that I got malfunctions from and they were bad - surprise, surprise - could never get through an entire mag with it). Sold each of them for $60.
• S&W Mod. 19 .357 Mag former police revolver that someone had removed the finish from and then attempted to cold blue all over. It didn't work out and the finish looked like an awful grey mess. Mechanically it worked great and was incredibly accurate and I fired more cheap .38 Spl ammo out of it than almost any of the first 10 combined except for the Argentine 1911.
• Argentine 1927 Systema 1911 .45 ACP
• CZ-52 7.62x25 Tokarev
• Russian 9x18 Makarov
• FEG PA-63 .32 ACP
• Beretta 1919 .25 ACP
• Star Ultrastar 9mm
• H&R 922 .22LR revolver
• Davis Arms .22 Mag derringer (it's always worked, never failed to fire in the half dozen times I've tried it. It has basketball sized groups at 5 yards though. I paid $20 for it and bought it from a friend).
• Kel-Tec P32 .32 ACP.
Vast majority of them were to just try out at the time. Some were from WWII or from the post war period. The cheapest pistol I have that I rely on currently is a Walther PPS M1.
To me 'cheap' is less than $300.