It looks like the symbols for dog (犬) and person (人) are at end of each verse. I can't speak Chinese, but I'd imagine the line rings well hearing the ordering of subject/object/verb like that.
There are more constraints than that - the corresponding words in each phrase are also the same parts of speech, and are often read with a specific cadence. See https://en.wikipedia.org/wiki/Antithetical_couplet