There's many reasons, one of those is that in standard ANSI C "int" is at least 16-bits by default, and even when working with 8-bit variables (declared "unisgned char" or similar) they are promoted to "int" for mathematical and logical operations.

So even if you have code as simple as.

**Code:**

unsigned char a, b, c;

a = b+c; // This is a 16-bit operation, the result will be truncated in 8 bits

Theoretically ANSI C reuqires promoting b and c to 16-bit, then doing a 16-bit addition, then taking the lower 8 bits and putting the result in a. Of course in this case the addition of the upper 16 bits can be optimized out by the compier, but it shows just how complex a simple operation is.

Another huge problem is that all variables are, by default, on the stack. The 6502 has very weak access to hardware stack : only PHA/PLA instructions, or combined TSX and normal operations on $100,X. Reserving 1/3 of the processor's register for stack access isn't very optimal, and is never going to produce optimal code.

You can implement a software stack, and that's what CC65 does, but the problem is exactly the same; 1/3 of the registers are eaten by the stack, and this will hardly ever produce optimal or even sufficiently fast/short code.