I've figured out a reason as to why transformers/cybertron used to be flesh and evolved into mechs. Primus is just dumb and didn't prepare. Ok, so, runback to the beginning of the story. Primus and unicron made soldiers to fight for them so they can inhabit a solar system that can make them habital. God stuff don't question the logic of it they're petty. So after primus won they decided to make their soldiers the first inhabitants of the newfound planet of cybertron /..them.
except.... their soldiers are based on primuses likeliness. And they do not need to depend on a planet or other force, nor do they need to eat, sleep, make more of themselves that isn't just spawning them into existence and instead actual biology that's supposed to make sense. As a result primus just made them rapidly evolve to be able to actually LIVE on cybertron fulfillingly, and as they evolved so did their intelligence (as if they weren't already intelligent- being able to fight in a WAR and stuff.) So, the whole being to transform thing was literally JUST the cybertronians idea because they got a little too smart.
also kinda off topic but since prima prime would've been around during all this they would've been the main guy to ask on "what the hell do we even do on this planet" since they could just, talk to primus, and everytime prima would progressively more aggressively say "I. Don't. Know." CAUSE primus didn't EITHER