I think the walking part is important, but there is also research that small breaks of any kind (except possibly looking at a screen) are beneficial when learning new information -- apparently because they insert new beginnings and ends to the work session, which are the points at which retention is maximized.