Is what Chainalysis did illegal?
No, because it does not violate any of the laws imposed in the United States, where it is headquartered.
But...
Is Chainalysis a bad actor?
Yes, because it has set up nodes for the sole purpose of attempting to violate the privacy of the blockchain #Monero
Zero ethics.
It's like a cop who thinks there are burglars in the neighborhood, spying on every house, which has its doors and windows locked, where the owners seek their privacy.
This attitude of the "policeman" Chainalysis violates that privacy, without having proof that the neighbors are criminals.