The first scrolls you all the way to the bottom of the page you're on; the second puts you at the top. So if you need to move in either direction, you don't have to actually scroll at all. For those of you who use Chrome or Firefox, this works in those programs, too.
This little shortcut is good to remember, as you can use it in other places around the Mac. In document-creation apps (like Pages or TextEdit), those shortcuts mean "jump to the beginning or the end of the text". So you don't have to scroll in those programs, either.
Finally, if you add Shift to those shortcuts, it means "select all the text between where my cursor is and the beginning/end". So if you place your cursor in the middle of a document (or select some text on a webpage), Shift-Command–Up Arrow will select everything between your cursor and the beginning of the document; Shift-Command–Down Arrow will select things between there and the end. We use this as an alternative to click-and-drag to select text, and it's more controlled than Select All.