If you are in any doubt that this is a deliberate strategy on the part of Apple, defensible or otherwise, just look at what they currently charge for DDR4 2400MHz SO-DIMM modules on their site. You can pick these up for like $25 elsewhere.
There's fairly obviously nothing special about Apple RAM outside of the price they charge.
Always appreciated but I am gonna be honest with you, since the pandemic, my MacBook Pro M1 has never left the house. I unplug just to keep the battery health on its toes.