The sponsoring of Hamas by Qatar has happened with approval from Netanyahu. Until October 7th of course.
And the reason that Hamas headquarters are in Doha, is because the US government requested that in 2011.
See e.g. https://edition.cnn.com/2023/12/11/middleeast/qatar-hamas-fu...