It means that `grep` should search for `ABC` string only at the beginning of the line _OR_ after space, moreover this string has to end with another space OR the end of the line.
In other words someone wanted to search for a strings which form whole _words_. However this regexp has many issues, namely there could be many other characters before and after _word_ (at least in natural language), i.e. `(`,`)`,`.`,`;`,`:`,`,`,`...`, etc.
Thus, it is better to use `-w` option of `grep`, alternatively play with boundaries: `\b` or `\<`/`\>`.