Depending on the corner and the temperament of the driver there are numerous racing lines. Nico intended to use the "standard racing line" a wide entry, clip the apex and wide on exit. Lewis wasn't on the standard or accepted racing line, however, he got to the apex that Nico wanted to make. To avoid an accident he took a more roundabout route, which then became an off track excursion, due in no small part to Lewis maintaining an unsustainable speed and cutting a very shallow arc.
To expand on this, there are typically three lines into any given corner:
The geometric apex has the apex at the mid point of the turn, and is the standard approach to pretty much every turn. You're shortening the course, smoothing out the turns, this is basic, work-a-day, elementary racing. It gets the job done.
The late apex - brake hard, come in late, but get on the power early, which is great for a corner immediately preceding a long acceleration section. This is
the secret to Donington's Redgate, and is a signature of most modern racing. This gives you after-corner overtaking opportunities, and is good for high-powered cars.
The early apex - in this line, you bring a lot of speed into the turn, often braking in the turn itself. It gives you great overtaking opportunities coming into the corner. It's not generally well-liked, as you can't get on the power early out of the turn - however, that doesn't mean it's not quick - if you're brave, and confident in your car, you simply maintain a higher average speed through the turn.
The classic back and forth battle in racing, where one driver seems like he has it in the bag coming into the turn, then loses out to the other car when it accelerates out of the turn is usually a result of two drivers using alternate racing lines. The one who dives down the inside and gets in front in the start of the turn is using an early apex - out-braking his opponent. The one who accelerates hard out of the corner is using a late apex, and manages to regain position in the acceleration itself, often because he can force the early apexer out wide/off the track. However, the reason that battling cars actually slow down a bit, allowing others to catch up to them, is that the two drivers are actually compromising each others' lines, and not gaining the full benefit of their racing lines.