The direction is something you can change at whim, independently of the function itself, so there's no place it "comes" from in this problem any more than there is a place the function itself "comes" from. Of course given the angle of the direction we want to investigate, we can explicitly write the direction with unit vector $(\cos\theta,\sin\theta)$; here $\theta$ is $\pi/4$, representing a perfect Northeast direction, but it could have been chosen to be anything else.
Visually, you can understand a function of two variables to be "elevation" and the two coordinates locally as longitude/latitude (or whatever), in which case the function defines a sort of geography with rolling hills and praires stretching out all over the place. The directional derivative tells us how steep the geography is in a particular direction at a particular point; if you're on the side of a hill then the direction up the hill is steep, the direction down the hill is the steep in the reverse way, and if you were in the middle of a praire all of the directions would look flat in the immediate vicinity.