Under Administration > Security – if you have selected “Review new manual agent installation in pending …” the DCs are going to show up automagically due to their being a DC role. This also holds true for SCCM Distribution Points.
This will happen even for a new DC that has never had MMA installed etc. If you assign them an agent to a different management group, then they will show up in THAT MG and not the one you mention.
Also be very careful with that SQL delete script! You fat finger that one and you’ll delete every server in your environment. I rewrote it with safety verification and named it “DELETE SERVERS WITH VERIFICATION”.
This way you can verify the results before you commit to it.