In my locale just the typically insulated 6 AWG insulated wire is fine within the wall structure for a 6/14-50 socket application (40A flow). No conduit required.
However the heavier 4 AWG for a hardwired application is typically in conduit. This for a few reasons, one of which is that it’s easier to run individual wires given how much thicker they are. And the conduit typically extends into the garage space anyway and is required for that exposed run.
I’ll let more up to date folks cite the actual NEC. Or just give the electrician who did the initial work a call.
However the heavier 4 AWG for a hardwired application is typically in conduit. This for a few reasons, one of which is that it’s easier to run individual wires given how much thicker they are. And the conduit typically extends into the garage space anyway and is required for that exposed run.
I’ll let more up to date folks cite the actual NEC. Or just give the electrician who did the initial work a call.