I personally wouldn’t consider that ethical.
Would the people running the show even know it was being done? They didn’t write it, the AI doesn’t even know it. All it knows is, people in that subset, that it doesn’t know are bipolar are subject to that manipulation to get the result it is tasked with, sell more, keep engaged.
As we start having more and more AI in our lives I think its inevitable that there will need be some sort of regulations created. At the very least all new functions/patterns created by an AI should be reviewed by a human.