Coding requires imagination and deep focus abilities.
Writing code can be done by anybody. Writing good code requires some kind of creative mindset.
Being able to get a problem, fully understanding it, break it into smaller modules, bricks, test them and get the expected results is a way to validate everything you're capable of: abstraction, intelligence, seeing the big picture in its finest grain size, providing working tools. This is very rewarding.
You may run into a lot of despair (swearing and/or chocolate consumption) during the entire process, trip over bugs, but when you have the final working polished product, boy, this feels so good.