At first it does not, but in practice it does. Cheap lenses have a physical F4, a aperture is the opening relative to the focal lenght, right. So F2 for a 50mm lens is 50mm divided by 2 equal 2.5mm aperture. so a Canon 50mm L and a 50mm 1.4 and a 50mm 1.8 all have a aperture of 2.5mm when shot at F2 and they produce same results. This is the theory at least.
But the 50mm 1.8 dows not have the same quality glass as the 50mm L. It has some cheap plastic elements which absorb much of the spectrum so at same ISO, F2 and 1/125 the 50mm 1.8 has just a nutella grey muddy image where the 50mm L has a lot more semitones and shades and color glare expecially in the shadows. Old timers call this shadow reading characteristic of a lens.
On an overcast day the difference is small. but enter an Orthodox church, dark and poorly lit , with just some light coming from a narrow window, and the differnece between the USM versus L glass is huge. And with the same settings the L shows you much more of the original scene and the garbage 50mm 1.8 has a lot of dark islands in the image. Try to open those up in post processing and noise level increses too. But color shades yuo will never recover.
The L lenses are like half of what a Leica lens does. now of course is up to the photographer to understand and try to overcome this and i am surprised that a lot of people only see better contrast and better constructuon in an L lens when the difference is in the colors and in between colors and their brightness. I am not talking about primary colors here but of those in between colors. you can't bring those in pp.
now a lot of people are not passionate photographers and are only after making a quick buck and have cheap 40% srgb laptop monitors so those will wonder "what is he talking about, I can slide vibrance all the way right and get crazy colors" ... lets try it this way. buy a cheap $30 tessar m42 and go do some roses and alternate the 50mm 1.8 with the tesar, both shot at F4 lets say. and then try to make the mutted dead dusty country side looking colors of the 1.8 look like those already found in the shots with the tesasar.
Yuo can try with the 50mm 1.4 too and have the same struggle. for paint colors this does not matter but when it comes to natural colors, flowers, water, different shades of the sky early in winter, and portrait, you will not make then look the same if you pp a whole day. you cannot regain what was previously absorb by the poor lens. All you can do is apply coection to what you have recorded but that you can do to the L glass too so the advantage still remains.
Nikon also marks this quality glass, with a gold ring and same as canon, has a cheap junk line 50mm 1.4 at around $350 and a 58mm 1.4 gold ring at $1500. and I see a lot of people wondering why. it's because of the glass. the glass in the L or nikon gold ring is quality optical glass where the rest is something, maybe plastic, maybe resin, maybe just lower quality glass.