As with most international law, the two most likely originations are either (a) mutual self-interest (e.g. chemical weapons) or (b) horrendous and inhumane abuse.
I expect with the first first-world drone war on a third-world country, there might be pressure at the UN to put something in place. At least for the automating genocide case.