What we consider "welfare" is typically not handed out based on merit, but based on need (and, from a global perspective, also based on privilege). The idea of a welfare state is not meritocratic. Many societies strive to be meritocratic with egalitarian constraints: anyone should be able to have a decent life (egalitarian), but to have a great life, one needs to contribute (meritocratic). Interestingly, inheritance neither fits the egalitarian nor the meritocratic perspective.