I've seen a number of bean pastas that have pretty close to a 1:1 protein/carb ratio. For example, this black bean pasta has 23g carbs and 25g protein per serving. On their own, black beans have a much lower protein/carb ratio (less than 1:2). Considering black beans are the only ingredient in the pasta, what accounts for the nutritional difference?
I can see three possibilities, though I don't know which is the actual case.
First, it is simply possible that the beans they source are, for some reason, very high in protein. The general nutrition numbers are averages, and can cover some pretty broad ranges - a potentially significant difference might come from testing specific batch of organic black beans from whatever farming processes versus the generic averages of all black beans.
Second, it is possible that the processing of the beans into pasta does remove some of the carbs, for whatever reason - perhaps starches that get left behind in processing (in soaking water?), or the starches and proteins separated and recombined in different, predictable, ratios (possibly to account for the potential variability of bean batches). Something similar is done with chocolate, the single ingredient is separated into constituent parts and recombined in predictable ratios, for a better and more consistent end product.
Third, it is possible that the ratio of carbs to proteins actually changes during the processing. I'm thinking of gluten formation, specifically, where the gluten protein that is formed in the working the (wheat) dough wasn't there in the plain flour - and making something like seitan from it, which is very high in protein, by developing the protein already present and washing away excess starches. I'm not sure of the actual chemistry behind black bean pasta, but it may develop some protein, something, in the processing that wasn't there before, which might perhaps alter the ratios in the bean pasta as opposed to the simply cooked beans.