I know rom size has their own standards, but since I will not use it on the real hardware, I could disrespect rom size rules! Also I know not all Nes roms are not 40.976 bytes long. Some are larger than that. So I thought you could increase it with no problems.
Nope, that's not how it goes.
You must respect the rules, young man!
It's true that not all ROMs are 40KB, but that's because they use bank switching. The NES has 32KB of address space dedicated to ROM access, so if you add ten bytes after that 32KB, how is the NES going to see it? It can't.
Games get around this by using hardware in cartridges to change which bits of the ROM are accessible to the CPU, but it has to do it in banks of 4KB, 8KB, 16KB - hence the term "bank switching". They can't load a few bytes after that bank, it just doesn't work. Hardware or not, an emulator won't work that way either.
And as for "increasing with no problem"... well, first you need a game with a mapper that allows for bank switching - so not SMB. Then you need to know how the game switches banks, and change the code to switch banks when you want it to. Trust me - that is not easy.
The 25th patch just replaces some bytes, but I don't know the details because it took me literally five minutes to do.