you are right, it does work in this case. However, if you were to execute other sed commands after 'w another.txt' like
sed -n '/abc/ p; /abc/ ! w another.txt; some_command' test.txt
then the file to write to would be interpreted as 'another.txt; some_command'
So for the purpose of general usability I have made it a habit to insert a 'newline' after every 'w' and 'r' command. If anyone else reads the thread and thinks he can use the command with some 'tweaks' there will be no confusion when he executes additional commands after 'w'. Or if for some reason one wants to change the order like
sed -n '/abc/ ! w another.txt; /abc/ p' test.txt # won't work; sed will try to write to 'another.txt;...'
sed -n '/abc/ ! w another.txt
/abc/ p' test.txt # will work as expected
I just took a look at the man page and this behavior is not obvious from the man page. At least not the one I have.