Or is it one more by-product of consciousness and intelligence?
Freedom is clearly different from certain other concepts arising from the uniqueness of the human mind, in that it exists. Morality, right and wrong, justice, religion, pride, self-respect, though it is useful to have them, need to be defined- in an essentially arbitrary way- before they can be put to any use. On the other hand, we really can make choices about our actions, and understand our own motives for making them, but it is less clear what the social benefit of it is, if any.
An individual acting freely is a problem for the group. Such an individual may choose not to contribute to the needs of the group, and may actively harm it. Such an individual will be constrained by the group to act in its interests, or expelled from the group. Our biology has little use for freedom. Nor are we alone in this.
Most primates are social, and the group has a leader who exercises complete control until successfully challenged by another. But most primates are herbivores, and herbivores tend to live in groups because it’s safer. What of the red meat brigade? Well, we also find that quite a few of the higher carnivores, though by no means all, also live in groups, controlled by a single male. Animals like lions and leopards presumably need to hunt in packs because of the nature of their prey and the places where they live, and so they need a powerful and intelligent leader to direct the hunt and keep everyone doing their job properly. Tigers and American felids, on the other hand, are much more solitary, again presumably because of the conditions in which they hunt. (Hedgehogs, by the way, have no leaders, and obey no one but ourselves. We know what freedom is for.)
In such groups, only the leader has any real use for intelligence and freedom of action. The only choice the rest have to make is when is the best moment to kick him out. All of this sounds very familiar.
Humans are capable of analysing their options and choosing an action at will. It may not even be the action that our analysis indicates is the best one. We are intelligent enough to be perverse.
It is beyond question that Homo sapiens is a social creature. And for that reason our ability to act freely needs to be repressed, or channelled, by the group. Individual identity continues to exist because societies at the higher end need to be constantly structured, restructured and controlled, and chemicals may be good enough for insects, but they don’t seem to work above a certain level of complexity (complexity of the organism and of the society).