If you're a non-citizen and you choose to go back home, you're probably also choosing not to be admitted back into the US for a long stretch of time, at least without a struggle.
This depends on the particulars of what happened, and it's going to be difficult for most non-experts to navigate, in the same fashion as "determine whether this code is Python or Ruby" is difficult if you've never seen a command line.
Say you're talking to your friendly neighborhood CBP officer and they say this:
"I think you're an immigration risk and, accordingly, I'm issuing an Order for Expedited Removal. You get on the next plane back home." Your passport gets tagged with a 5 year timeout.
However, they could say something like:
"I think you're not eligible for the Visa Waiver Program, because some factors suggest you're an immigration risk. I recommend you withdraw your application for entry into the United States and voluntarily get on the next plane back home." You will not get timed out for 5 years.
Note that the second one is neither a recommendation nor a request.
Disclaimer: IANAL but IA someone who has to have an anomalously-good-for-most-Americans understanding of immigration procedure.