Duplicate record problem
with 
cte1 as
(
    select *, row_number() over(order by Ad) RowNumber
    from #Personel
),
cte2 as
(
    select *, row_number() over(order by newid()) RowNumber
    from #Masa
)
select cte1.Ad, cte2.MasaAdi
from cte1
    join cte2 on
        cte1.RowNumber = cte2.RowNumber