Apple already had giant margins before and could easily absorb memory price increases. The fact that they did not and instead decided to increase prices shows how confident they are that people will buy their hardware anyway.
Their price increases were a mixture of absorbing some of the increase and passing what they won't on us.