Use "you" or "one" in formal writing?
Solution 1:
Using "one" when you want to address a person in general, not specifically the reader. This was considered good practice in general. Consider this:
When the stakes are high one is often tempted to cheat.
Verses:
When the stakes are high you are often tempted to cheat.
You might prefer the former to the latter because the latter comes across as very accusatory. This is really the only circumstance I will use "one" as opposed to "you." Generally, except in very formal writing, "one" comes across as rather pretentious or old fashioned. It puts distance between the reader and writer which might be a good thing, but often isn't.
As another commentator mentioned, often it is possible to rewrite in such a way as to avoid both. For example:
When the stakes are high, cheating is more likely.
Solution 2:
It's to avoid writing in the second person. When you refer to someone with the phrase 'you', you act as if you are speaking to them. However, when one uses the word "one", it is as if one is speaking in general terms, not refering to any specified individual.
It isn't a hard rule that every use of 'you' is writing in the second-person, but rather more a guideline to help a writer avoid overuse of the word 'you'.
What a GOOD writer can do, instead of just replacing every instance of 'you' with 'one', is write out their essay in such a way as to avoid referring to individuals at all. This avoids the problem of referring to individuals specifically and prevents the work from sounding pretentious from the overuse of 'one'.