Recently released games have been developed when PS5 and Xbox Series consoles were already released. They target just these platforms not because developers don’t want anyone else to play their game, but because hardware capabilities of these consoles are baked into game’s design (for example, having SSD means faster loading, which allows moving through game’s world at higher speed). Apex Legends was released in 2019, so it was designed for the PS4/Xbox One generation of hardware. I don’t think there is a desire to make maps bigger, have more players in the match, or something else that would require abandoning initial platforms because they would no longer be able to run the game. Switch 1 was deprecated only this year and it’s a much weaker hardware.
Also, Apex Legends is a free-to-play game, so it naturally has a large portion of audience who can’t spend much money on video games. With current prices I doubt many would be able to upgrade from last-gen consoles if they were asked to, so abandoning PS4 and Xbox One would effectively permanently close access to all those players, who may have been playing Apex Legends for years. And all those players don’t deserve it.