There's an assumption here though. You're assuming that if free will exists, that AI doesn't have it.

Note that any argument you make about AI being programmed to do a certain thing, can be said about humans also. We are essentially machines.