Why is the nutritional composition of tofu different from soybeans?
They were literally thrown away, physically removed from the whole. 

The basic steps of making tofu are: 


Make soy milk out of the soy beans. The residue after straining the milk, called okara, is not used in the tofu. It contains lots of carbohydrates, especially insoluble fibre. 
Curdle the soy milk with epsom salt. 
Separate the curds from the whey and press them. The whey (which also gets thrown out), also contains some carbohydrates. The proteins stay in the curds, they are actually the stuff that curdles. The fat is water insoluble, it stays with the curd. The soluble carbohydrates are partly trapped in the curds, and present in the whey which doesn't get pressed out (if you press out completely, you end up with an inedible block of rubber), so there are some carbohydrates left. The rest goes away with the whey.