The law has nothing to do with it. Amazon is a private company and can make rules about who can or can't place orders on its website. When you create an account you agree to their ToS.
And they even provide a definition of what an Agent is:
"Agent” means any software or service that takes autonomous or semi-autonomous action on behalf of, or at the instruction of, any person or entity.
Though to me it raises even more questions. What is a software that takes "autonomous" action on my behalf. Is curl "autonomous"?
Only when you supply -L
What if I set up a cron job to buy a certain product every month - is that not autonomous? What if it is first querying my live toilet paper sticks to make the decision?
What's the criteria that makes one function "autonomous" and the other one "manual"? I feel it really boils down to this.