Commercial DS games have a built-in filesystem that works differently. The carts know to only load the first part and then stream data from the microSD card as the game requests it. DS homebrew *.nds files however do not run like this. Instead, the homebrew app is loaded entirely into DS RAM and then executed from there, so if your program is larger than 4 MB it will not run. The homebrew files I mentioned earlier get around this by executing directly from the GBA cartridge, something slot-1 cannot do, and because of that their limit is 32 MB since that's the limit for the total filesize of a GBA file.
Most DS applications nowadays however use microSD card access for storing files. When doing this, you load just the core data in a *.nds file that's less than 4 MB, and then you can access external files that let the program work correctly. This is how, for instance, Moonshell can play a 20 MB video file. Moonshell's *.nds file is less than 4 MB so it gets loaded into RAM and run, and then it streams the larger file from your card and works with that. Come to think of it, this method of loading data is very similar to the way commercial games work, just without packaging everything into a single executable file.
There actually was a way to embed your media files into Moonshell's *.nds file up until version 1.5, but again this was only useful for slot-2 users, especially ones with NOR-based carts that don't have filesystems, and you could only have up to about 30 MB of media files or you'd go over the GBA's 32 MB limit.