I have a table with data like so:
SELECT DISTINCT [NAME]
FROM TABLE A
INNER JOIN TABLE B ON A.ID = B.ID
The reason you get duplicate rows without DISTINCT is because every row of ID = x will be joined with every other row with ID = x. Since the original table has (1, "Bob") twice, both of those will be joined to every row in the other table with ID = 1.
Removing duplicates before doing a join will do two things: decrease the time to run the query, and prevent duplicate rows from showing up in the result.
Something like (using MySQL version of SQL):
SELECT L.NAME, R.NAME FROM (SELECT DISTINCT ID, NAME FROM A) AS L INNER JOIN (SELECT DISTINCT ID, NAME FROM B) AS R ON L.ID = R.ID
Edit: is B an alias for table A?