Dennis has explained the 3rd slash, needed to separate the
host from the
path, but the other two are much more interesting...
It turns out they were a useless and somewhat arbitrary addition to the URL syntax. Tim Berners-Lee, inventor of the World Wide Web and author of many of its standards (including the RFC that Dennis linked to), lamented his usage of the 'double slash' in an interview back in 2009.
The double slash, though a programming convention at the time, turned out to not be really necessary, Mr. Berners-Lee explained. Look at all the paper and trees, he said, that could have been saved if people had not had to write or type out those slashes on paper over the years — not to mention the human labor and time spent typing those two keystrokes countless millions of times in browser address boxes.
So, save for a minor (and uncharacteristic) lapse in foresight some 18 years ago, your file URL could just have easily been
file:/D:/Desktop/Book.pdf, rather than
There is, to answer your question, no good reason why URLs have 3 slashes.