It should really be worded as Carbs give you energy to train - which indirectly helps you build more muscle (training harder > Building more muscle) - Fats also give you energy to train, which indirectly in turn helps build muscle...
Its fairly straight forward and really bodybuilding for beginners 101
Protein - builds/repairs muscle
Carbs/Fats - Provide the energy to train
Where your fuel source comes from is totally upto the individual - be it a mix of carbs/fats, just fats, more carbs, less fats etc etc....
Don't overthink things - get the basics right and work out what works for you.