I have been having this doubt for long. As by the first law dq=du+dw (neglecting KE and PE change). And we know that the work done by the system can be utilized in things (eg. boundary work, shaft work, shear work, paddle wheel work..etc).
For open flow system replacing dq=tds, we get,
tds=du+...