Ancient soldiers often herded horses while garrisoning the frontier.
Tips
history
In classical Chinese, 牧马 doubled as a euphemism for cavalry maneuvers on the frontier — by extension, 'enemy cavalry coming south' (e.g. Xiongnu raiders). Modern texts use it almost exclusively in its plain herding sense.