It's actually really nice 3DS is still getting releases. It makes slower adopters for next gen not feel left out plusbreaks the trend of Nintendo abandoning their previous handheld as soon as the new one comes out. Though it only does that cuz they abandoned their previous console lol.
Someone brought up the sales of the 3DS as the reason Nintendo keeps releasing games. The natural reply is "why isn't the 360/PS3 getting new games then huh?" Firstly they did get games into the first year of next gen. Next they didn't get more games after because it's in Microsoft/Sony's beat interest to cut support. They need to be on the cutting edge to maintain interest in their company.
Nintendo is keeping 3DS afloat by themselves cuz they need the funds. Third parties are coming to the Switch but not fast enough and the install base isn't there yet anyway. There's also the fact that developing for the 3DS is relatively cheap since it's hardware is so wildly simple compared to every other device on the market now.