Cytoskeletal networks of actin filaments and myosin motors drive many dynamic cell processes such as migration and division. A key characteristic of these networks is their contractility. Despite intense experimental and theoretical efforts, it is not yet clear what mechanism favors contraction over expansion in these networks. Recent work points to a dominant role for the nonlinear mechanical response of actin filaments, which can withstand stretching but buckle upon compression. Here we present an alternative mechanism. We study how interactions between actin and myosin-2 at the single filament level translate into contractile activity at the network scale by performing time-lapse imaging on reconstituted quasi-2D-networks mimicking the cell cortex. We observe myosin end-dwelling after it runs processively along actin filaments. We demonstrate how this process leads to the transport and clustering of actin filament ends and the formation of transiently stable bipolar structures. Further we show that this myosin-driven polarity sorting leads to polar actin aster formation. The asters act as contractile nodes that drive contraction in crosslinked networks. Using computer simulations, we show that the contribution of the end-dwelling mechanism increases as the characteristics of the network become more in vivo like, relative to alternative mechanisms requiring nonlinear mechanical response of the filaments (buckling).