Doing those operations from an IRA brokerage account not only postpones or eliminates income taxes, but it also eliminates the need to make tons of tax returns. You can buy, sell, and buy back shares from your IRA as often as you like. The freedom to change stock selections as often as you like doesn't make it a good idea. Day-to-day trading with your IRA (choosing stocks and reselling them within hours) is legal.
However, it takes a lot of knowledge and skills (and a lot of money in the account) to buy and sell that quickly without having to resort to the wrong horse. If you don't intend to hold stocks for the long term, you need skill and experience to succeed. On the other side of the coin are tax losses. When you sell stocks at a loss in a taxable account, you can deduct losses from your profits and even from your regular income up to a limit.
If you sell a stock within an IRA at a loss, you won't get that benefit. Buying, selling and trading stocks from an IRA is not much different from doing those activities outside of an IRA, but with an IRA, you don't pay taxes on your profits or get tax relief for your losses. Nothing in the rules of a standard Roth IRA prevents you from buying and selling stocks the same day.