Your confusion might steam from not being aware that DASM is just one of many 6502 capable assemblers which most came way before DASM - and some much later, like CA65.
The Fine Print
Would somebody care to explain how "Super Mario Bros." was released in 1985. But the DASM Assembler came out in 1987?
There is no relation between Super Mario Bros. and DASM.
The 6502 Assembly language was introduced in 1975. How would you compile/convert Assembly code into machine code back then?
By using the cross assembler provided by MOS. That cross assembler did run on a GE timeshare system and was already available before the 6502 went to market. Cross assembler packages were as well offered for IBM mainframe and DEC PDP-11.
Heck, in some way we have returned to these times by using again cross assemblers like DASM, XA65 or CC65, haven't we?
Why wouldn't we just use that compiler instead of using DASM?
Well, shouldn't the question be rather "why using DASM?", as it is just one of many assemblers (and other tools) able to produce 6502 code. (*1)
How does that compiler compare to DASM?
Well, the first ones provided by MOS are rather primitive, something that is even visible in the syntax of basic 6502 instructions, as they are made to be compiled in a single run without much analysis needed.
Later assemblers added more tools to structure and modularize source code, macro capabilities, language/runtime linking and so on.
What are the differences?
Since there are literally dozens of 6502 capable assemblers (if not hundreds), any serious comparison would take a book of many pages, so a bit out of scope here. If there are really pairs of interest to you, maybe add a more specific page.
In general it ranges from Wozniaks Mini-Assembler build in the Apple II ROMs (1977) over similar but more sophisticated ones available for many 6502 machines of the late 70s/early 80s, over third party assemblers like LISA, some grew from simple to quite sophisticated, like Merlin, all the way to serious capable systems like CA65 or, IMHO the best of all, ORCA/M which gives almost mainframe like flexibility.
In this range DASM occupies a spot at the lower middle class. Its capabilities are rather limited, but it shines with a good documentation.
TL;DR What did Nintendo use to compile their Assembly code?
I'd says some tool chain of their own, were the assembler was only a tiny part of. Being a well funded company they did employ standard development systems, usually hosted on larger workstations running special cross assembler packages. Such systems do as well include ICE (In Circuit Emulation) debugging and alike, simplifying bug hunting a lot.
There's no way they wrote actual machine code, right?
Not really, who would? (*2)
*1 - DASM is not among the most capable. It might be fine for small projects, but as a professional, getting paid to do the job, I wouldn't use DASM for anything larger than a few pages - the same amount one writes Sunday afternoon using Notepad - if at all.
*2 - Then again, Wozniak did not only write all Apple 1 software, but as well the Apple II monitor and much of Integer BASIC by hand. But these were not only the very early times but as well at a time when Apple wasn't loaded with cash like now - to put it mildly.