Asking if selling money for less than the face value of money is illegal is like asking if you can get a speeding ticket if a cop clocks you going faster than light.
It's not a legal impossibility, but a mathematical impossibility.
In a modern setting, money is usually valuable because it is legal tender, which means that if it is offered in exchange for goods or services it must be accepted for that good or service by law in that jurisdiction. They don't write "Valid for all debts public and private" on USD for funnsies (Its a bit more complicated than that, but for our purposes we don't need to discuss when you don't have to accept cash for payment).
Typically when you buy something, you and the owner will enter into a negotiation as to what the owner will receive in exchange for giving you the thing you want. Until the the owner recieves an equivilent value, the item you want is still his. Back in the old days, you might trade some eggs from your chickens for a gallon of milk or other barter, but this was a cumbersome system because it literally relies on comparing apples to oranges. Currency, was created to speed the barter system up by being a medium of exchange. Thus by comparing the difference in prices between apples and oranges, you get a comparison of apples to oranges in a standard format (If a farmer wants $1 dollar for an apple and $5 for an orange, than an orange is worth five apples.).
The ability to act in this way makes money valuable... or at least... it does with a few other things. That "Full Faith and Credit of The United States Of America" and the "Legal Tender" thing things essentially mean the U.S. Dollar allows you to participate in the U.S. economy (which is the most powerful economy in the world). Other currencies for major world economies are valuable because the allow participation in that economy Or they will sell their currency for another fiat currency at a very controlled ratio.
Because of this, the dollar is only as valuable as the thing you get for it... or to put it another way, the dollar is only valuable because it clears you of a dollar worth of debt you incurred from purchasing a product.
So long as you understand the full agreement of the deal between you and your friend, an exchange of a $1 dollar bill for a $20 dollar bill assumes some creation of a $19 debt on your part that turns into a $1 debt on your friends part when you give him him the $20, so he gives you a $1 bill and now you're even.
Where did the $19 debt come from? That's your buisness. I'm inclined to believe that the exchange is unfair to you, but you accepted the terms of the deal. Unless you had no idea you'd loose $19, I can't hep you.
But... there are some perfectly valid reason I might pay more than face value for a currency.
The first could be in currency exchanges, where, because of the prices between three or more currencies not being even, I can exchange $20 dollars for the equivelent of foreign Currancy A, then exchange that currency for Currency B, and recieve an amount Currency B that is trading for $21 dollars. This normally will happen on several more steps and not nearly quite as dramatic, but because each central bank issuing the currency determines how much they want to keep another currency in balance with their own, price don't change across the board, and there are times where exchanging multiple currencies can net a profit.
But more likely is that while all currency is worth face value, indvidual productions of currency can be worth way more than printing. Many people will collect currency like someone collects art. These collectors typically will pay higher prices for currencies with flaws or older prints of currency (paper currency has a very short circulation life, due to paper not being known for it's sturdy nature. Thus a bill with an old issue date has inherit value to collectors because not many are left in circulation. Coins are much longer lasting but coins are typically made with a face value of a certain metal. When the metal suddenly becomes more valuable, the coin does as well... at one point, most pennies ($0.01) contained an amount of copper that made them more valuable if they were melted and then sold to a copper recycling center than they were as a penny.). And because of changes in the metal's price, over the years, the production of a coin may change the amount of the precious metal to reflect the price increase. Coins that predate this change are valuable because of the money.
Other collectors will collect currency that has a flaw in it's printing. How these flaws get printed and how valuable that makes the specific currency depend on collectors, but suffice to say, depending on flaws, rarity, and age, collectors could pay 100s to Thousands of times more the face value for the currency. And if you don't care about the collector market, these coins and bills are worth just the face value.