Why is charcoal useful as a fuel compared to wood? Don't we lose energy by making it? Charcoal is produced by partially burning wood. However, as the wood is burned, some of its energy is lost. Why is it that charcoal is still preferred as a fuel instead of wood in many cases?

Doesn't charcoal contain less energy than wood? Is the main reason that wood contains a lot of water which would form unwanted vapor?
As I understand it, charcoal --mostly carbon, plus some amount of inorganic ash-- burns cleaner - and hotter - than wood, and has more energy content per unit of weight than wood. The process of making charcoal involves heating the wood in the absence of air or with limited contact with air - driving off water and low molecular weight oils and odor components that produce a lot of the smoke from burning wood, and converting cellulose (a major component of wood) into carbon plus water.