The Rams chose to give Jalen Ramsey a contract. Its not a guaranteed contract, and it does not have a no-trade clause. So, if the Rams have elected to shop him, they are not going back on their word or acting contrary to the contract. The contract has options, and if the Rams think it is in their best interests to "sell" Ramsey's contract to another team (which means they may pay some of those cap dollars, while transferring the obligation to pay the remaining cap dollars to another team), they're not doing anything improper, unethical or inappropriate.
Is it the best move for the team? Now, that's debatable (and, of course, depends on the price).