If modals should be generally avoided why Facebook still uses them a lot? [on hold]

For some time now the modals and overlays in general have been considered less than ideal solution in UX.

What I find strange is that Facebook still uses them a lot and sometimes even for new features as lately for detail of the user in the group you are part of.

I suspect that the reason might have to do with performance and general complexity of Facebook web page but still I can't shake the feeling that Facebook doesn't mind using modals.

Is my assumption real ?