value for money depends on what you value. the 3 series is larger, gets more options, different build process, more sound deadening. The 3 series gets more light weight stuff in the chassis as well, the 330i weighs like only 120 pounds more than the 230i.
im not sure if its still a thing but the 3 series offers individual color options. at least on the M3. This was never available on the 2 series
I think you can compare the GT cars to Ferrari. The other models not really.
The modern Ferraris are all turbo charged and automatic though. Gt3 is still manual, light weight, and NA.
But you are also comparing entry level Ferrari to top of the line porsche 911s. Like a top of the line civic type r is going to hold better value than an entry level bmw m240i at 50k.