>>21555031 (OP)
The beans are more nutritious with some protein but in those portion sizes both have minimal nutritional value.
If the rice is brown rice it's beneficial for fiber if not it has almost zero nutritional value.
Both of them are served as side dishes because they are flavorful and dirt cheap to add value to an entree.
Hence a burrito that has a food cost of a dollar can generate a substantial menu price with a spoonful of beans and rice.