As the article states, they were forced to by Swiss authorities. They tried to fight against it, but in the end no reputable provider is going to put the whole company on the line for 1 user against a lawful order from their government.
> Why's a privacy-first service logging IPs in the first place?
> French police sent a request to Swiss police via Europol to force the company to obtain the IP address of one of its users
They weren't logging until they were forced to.
A while back on the very hackernews thread when the news of the French activist being jailed it was highly discussed, the source of the data being ProtonMail themselves