Why does drawing $\square$ mean the end of a proof?

It just means the same thing as q.e.d. Its introduction is usually attributed to Paul Halmos:

"The symbol is definitely not my invention — it appeared in popular magazines (not mathematical ones) before I adopted it, but, once again, I seem to have introduced it into mathematics. It is the symbol that sometimes looks like ▯, and is used to indicate an end, usually the end of a proof. It is most frequently called the 'tombstone', but at least one generous author referred to it as the 'halmos'.", Paul R. Halmos, I Want to Be a Mathematician: An Automathography, 1985, p. 403.

(This is quoted in Wikipedia)


See

When typesetting was done by a compositor with letterpress printing, complex typography such as mathematics and foreign languages were called "penalty copy" (the author paid a "penalty" to have them typeset, as it was harder than plain text).[8] With the advent of systems such as LaTeX, mathematicians found their options more open, so there are several symbolic alternatives in use, either in the input, the output, or both. When creating TeX, Knuth provided the symbol ■ (solid black square), also called by mathematicians tombstone or Halmos symbol (after Paul Halmos, who pioneered its use). The tombstone is sometimes open: □ (hollow black square).

http://en.wikipedia.org/wiki/Q.E.D.#Electronic_forms


I have been told that it had a practical application. When a referee has read through the proof and checked its accuracy they could check the box.