Use
echo -e "foo1_3\nfoo_3" | sort -t_ -k1,1
Conforme o manual de classificação declara :
'-k POS1[,POS2]' '--key=POS1[,POS2]'
Specify a sort field that consists of the part of the line between
POS1 and POS2 (or the end of the line, if POS2 is omitted),
_inclusive_.