If you make a "clearly erroneous trade" (e.g., 500 shares of GOOG at price $100 instead of 100 shares at $500) you can have the trade broken. You can say "oops, undo", as long as you do it within 30 minutes.
Market manipulation, specifically deliberately placing orders/trades/news to confuse other participants, is also illegal. It's illegal if you do it by pump up a stock on yahoo message boards, and it's illegal if you do it in a boiler room, and it's illegal if you do it to a bot.
Maybe the rules should be changed, but this is what they are at the moment (at least for US equities [1]). Everyone, besides a few bad actors (Trillium, these norweigans) is playing by these rules.
[1] I know Japan, for example, does not have the "clearly erroneous trade" rule.