A magistrate says he would have jailed two Melbourne developers if he had the power to, after they pleaded guilty to dumping asbestos from an illegally demolished historic pub near homes and a childcare centre.