The fat:carbs:protein ratios in soybeans is about 25%:35%:40%.
In tofu (which is made from soybeans) these ratios change to roughly 35%:10%:55%, so it becomes a low carb food.
Where did all the carbs go?
They were literally thrown away, physically removed from the whole.
The basic steps of making tofu are: