There's plenty good reasons to have microphones in products. The simple obvious one is voice control. Legality and illegality all depends how it's used and controlled. And the company is controlling this remotely.
And your rank and file engineer or software dev is going to have low/no understanding of the subterfuge and illegality that the Executive class puts together as a final product. The features are possible, but the labor only knows their pieces. Executives are the ones selling illegally gotten data to "their 500 sponsors".
Everyone involved is to blame (including management), but it is an engineer somewhere that actually makes these things. Devices don't magically start spying because a business person makes a deal. The data doesn't magically end up in the hands of their 500 partners. There are large datastores to scale and integrations that require work to build.
And even if they're never held accountable (I expect they won't be), you should at least be acknowledging that they have no ethics and shunning them, not defending them for actually being the ones that built surveillance hellworld.
The rank-and-file do follow marching orders, but let us not pretend they are all innocent sheep who could not envision the true intentions of the design. "I just thought it would be a neat thing if all sounds in a room were recorded and uploaded to Samsung servers without bothering the end user!"