Here's a thought experiment.
Imagine you are looking at a drop of blood under a powerful microscope. You are able to see white blood cells attacking and consuming foreign invaders. You say: It sure does seem like the white blood cells want to go after those foreigners! But they are pretty complacent when there are no invaders. What vigilant guardians are these beings! But then you come back to reality and realize that although it seems that they have a will and mind of their own, it's really all just chemical reactions.
Imagine giant alien beings are looking down at humanity. One says: Look at those humans, they seek pleasure, avoid pain, they often act according to a moral code; they even make scientific discoveries! The other one says: It sure does seem that way, but we both know that it's really all just chemical reactions.
How are we different from the white blood cells?