RAM is a resource that they can't oversubscribe, so it costs more.
If I have an instance with 8x CPU cores they can timeshare CPU time between multiple customers on that physical server, since it's unlikely that all instances will use 100% CPU 100% of the time.
However, if I have a server running memcached and a 30GB cache, they can't also cell that RAM to another customer. This limits the amount they can oversell server resources, thus they charge more for it.
Comments
RAM is a resource that they can't oversubscribe, so it costs more.
If I have an instance with 8x CPU cores they can timeshare CPU time between multiple customers on that physical server, since it's unlikely that all instances will use 100% CPU 100% of the time.
However, if I have a server running memcached and a 30GB cache, they can't also cell that RAM to another customer. This limits the amount they can oversell server resources, thus they charge more for it.