Perhaps Alexa / Echo are not directly profitable as a device, but they make money from people buying stuff on Amazon.com with it, and gain that brand loyalty from it. Which has definite value. But there are estimates it costs somewhere around ~$30 to produce one [2]. So at ~$60, its very profitable. And when they sell them for $30 for a special or something, its still in the break even area. A couple sales and you are in the black.
[1] https://www.wired.com/2015/10/get-used-to-amazon-being-a-pro... [2] https://voicebot.ai/2018/02/15/apple-homepod-costs-216-manuf...