If I've understood the story right: While SMB1 was this revolutionary really awesome platformer, the Japanese SMB2 had identical mechanics to SMB1, the same graphics and an extremely small amount of new content (2 new enemies?). Many things were inconsistent too, in SMB1 underwater enemies would appear in underwater levels only, but in the Japanese SMB2 they'd sometimes be floating around in air. SMB2 was also incredibly hard, and was determined to not work at all on the American or European market, which is in my opinion very true.
I bet Nintendo had these expectations after SMB1 and needed something that would really blow people away again, despite that at this time many more good NES games existed. The japanese SMB2 would never have worked. I guess it was just an easy move to replace some graphics in Doki Doki Panic, which was also developed by a Nintendo branch anyway.
They didn't really steal doki doki panic. It's still within the same company branch, plenty of the SMB1 people worked on DDP (Shigeru Miyamoto who was one of the SMB1 directors, is also a producer and designer on DDP, and was more involved with DDP than he was on the Japanese SMB2), and the DDP developers are properly credited in SMB2. It's just the sort of stuff that some companies do to get a good profit, it's no different from many games sold through publishers where the developers have been required to change themes, graphics, or other content. If you e.g. want to create a downloadable game for the 360, Microsoft might step in and ask you to modify stuff that you didn't really have in mind. What I'd really like to highlight instead of the SMB2/DDP thing is that this happens all the time, with tons of the games which we play and love today. It's just harder to see when there's no "this was the original idea" game to compare them to.
Of course, I'm anally against changing the content of my own games if it's not a change I want, but that's a different story