ELI5: What’s the chemical difference between charcoal and coke?

r/

Charcoal is from plants, coal is from the ground, and coke is what happens when coal goes through dry distillation.

But as far as I can tell, charcoal and coke are both very purified forms of carbon that can be burnt for power. Both in through the same process of dry distillation and heating that drives away impurities. but they are specified for different tasks. Why?