It is a misreading to conclude that the Patanjali Yogasutra has, in fact, any interest in directing a moral life. The text uses modalities of behavior, intention, and directives to action for the purpose of creating a method that prepares the aspirant for the achievement of samadhi and/or nirodha.
The purpose of yamas and niyaman as such is not to lead us back into the world in order to lead an ethical life---certainly there is not value added project associated with such a life except as it facilitates the further processes of introversion and excision _from_ the world. Thus, there is no morality as such in Patanjali's yoga and what is proposed has to do with furthering the relinquishment of karmas and the extrication of one from the world. To be moral would be to commit TO the world and I challenge anyone who reads YS to show me how this text commits us to a further engagement with the limited and conditioned world. It's purpose is precisely the opposite. To wit, to prepare us and create a circumstance of experience----be that physical, mental, or emotional---for furthering our introversion for the purposes of arriving at a state that renders us immune to mental trauma caused by change. This is the so-called citta-vrtti-nirodha.
The idea is to attenuate and then cease little by little any and all such involvements with the world. There is no such commitment to deepening commitments of action in the world---that would only cause further karmic malaise and thus further implicate bondage. Morality is merely prepatory or heuristic on a path that entails further disinvolvments If we are to compare, this is why Krsna in the Gita does have a buy in to the moral order insofar as he is admonishing his pal Arjuna to get back to the fight, win the war, and get on with it in a society that has standards and principles and even values. One can argue that that admonishment is also not moral as such but legalist. We are enjoined to align our intentions with behaviors that are enjoined and commanded by virtue of social rules, or Dharma. We aren't being asked to be good. We're being asked to act in certain ways and that our intentions about such acts inform and have consequences about those actions. The actions themselves that are enjoined might be construed to be moral but that is not the reason they are to be enjoined nor would it matter. The fact is that they are commanded as such, that they are social expectations of the law to be met. That they are deemed good is epiphenomenal once again: their goodness is not their point, their execution in totality is the point. But just what the natural world of karma has to do with the ethical remains a more open argument because it begs the question, just how does the natural world reward or punish any action on the basis of intention or value?
Here we can argue tha the Gita is influenced by Buddhists and others who claim that moral intention has natural effects. But where is the evidence that Krsna thinks this? Where is the evidence that this is more than just a claim about how the world works? There is none, as far as I can tell. The ethical as such is of no mind to the world of power. The answer I think is that there are no morals as such but there are rules and expectations. If you want to think those come from intentions, it wouldn't change a thing. Our cultural lives are anything but immune from the implications of our beliefs or actions expressed and our lives in the natural world are deeply if not wholly culturally affected (when it is not determined).
What I mean is that culture will reward and punish us for our ethics, be they intentions, words, beliefs, or actions and that means we as natural beings with bodies will be deeply influenced and affected. What culture can do to us will influence our physical an and emotional well-being as creatures.
Is that ethics as such? I think not precisely because what is at stake is not goodness but a sense of physical and mental health that is required to undertake the further practices enjoined as yoga. That yoga---to say it again---does not invite us to live ethically in the world but to intend and act in ways that relieve us of the burdens of being in the world. I think that what we call ethical certainly influences our lives because human beings depend upon and are formulated culturally and socially. Thus, our actions or intentions have implications of outcome and consequence whether or not we mean it but apparently particularly when we mean it. Krsna in the Gita wants out of the morality business as quickly as he can make that happen so that he can resume the regular order of a powerful but amoral universe. Yogasutra never was in the morality business, not even a little, not for any reason that has to do with the agendas of yoga.
The only exception to this argument I can muster is that if we are unethical this gets in the way of the projects of introversion and reidentification with immortal (always immune) Self. Thus we entangle ourselves in even worse karmas when we violate moral dicta but otherwise the issue is not to become moral but to stop acting in the world in ways that implicate further karma at all. Let's put it more plainly, Yogasutra gives no fucks for the moral dimensions of a given behavior or intention except insofar as it creates some, more, or any consequences that would interfere with the project of yoga, which has to do with disentangling with the world. There is no bodhisattva doctrine of saving others; there is no call to compassion or empathy.
How would any of that lead to eliminating false identification with the temporal? How would any commitment to entangling oneself in moral choices make it clearer that one is not merely the conditional, material reality but the ever perfectly free disentangled by nature Spirit that is Purusa? The strategies of yoga purported by the Yogasutra are, at best, influenced by Jains and Buddhists insofar as they all agree to espousing relief, extrication, DISINTEREST in acting or reentering the world. There is no concomitant commitment in YS to saving others from their karma or claiming that ethical behaviors are for ethical purposes. One acts to relieve karma, not to do good as such Just what is the world for but leaving it? Until you grasp this agenda of the YS you do not understand its most basic interpretation (according to Vyasabhasya). Some later interpretations espouse moral action as karma relieving but is this the same as making a commitment to some kind of social good or personal conscience?
I fail to see how that would matter if one's goal is not to stay in the world to do good but rather to arrive at a sublime state of exemption. Once you get that that is the ACTUAL agenda then all further questions of ethical actions are, at best, epiphenomenal or irrelevant. I hope this makes it clearer that there is no ethical theory nor are their ethical injunctions made in the teachings of Yogasutra.