Let me begin by unpacking the question. The question implies that there is a simple relationship between the will and actions, when, in fact the relationship is actually quite complex. The question juxtaposes predictability with acting in one's best interest when, in fact, much of the human behavior that is predictable is against one's own best interest. The claim that our will is determined does not require our behavior to be predictable. Conversely, predictable behavior does not require our will to be determined. Although the term "freewill" was not used in the question, it is important to understand that the absence of what is commonly believed to be freewill does not necessarily imply determinism. Once these points are addressed in more detail, the framework will be set for understanding the answers to the main question and the follow-up questions.
The word "act" in the context of the question refers to human behavior. As the question implies, our behavior is an outward expression of our will. For example, if we want to volunteer our time at a soup kitchen, we take the necessary steps so that our behavior reflects our will (e.g., get in our car, go to the soup kitchen, ask if we can help, etc.). But there are two important caveats here: (1) our behavior does not always reflect our will and (2) our behavior is influenced by more than just our will. We can want to volunteer our time at a soup kitchen, but never do anything about it. This might be because we have competing desires that take precedence, such as the desire to plop on the couch with a bag of chips and (re)watch all the seasons of "The Bachelor." Or, it is also possible that social anxiety, a bad back, or other psychological or physical problems prohibit us from taking action. The main point is that even if we were to know the exact will of someone, this would not be enough information to accurately predict their behavior.
It is very clear that people don't always act in their best interest. We are not just rational beings, we are emotional beings, as well. We know that smoking is an almost certain death sentence, yet an estimated 42.1 million people still smoke in the United States alone (Health, n.d.). We know over-eating leads to all kinds of problems including early death, yet more than 1/3 of Americans are obese (“Adult Obesity Facts | Data | Adult | Obesity | DNPAO | CDC,” n.d.). Millions of firefighters, police officers, service men and women, and people in other professions risk their lives every day for other people. And most parents wouldn't think twice about risking their lives for the life of their child. In many cases, we can predict with good accuracy that people will act against their own best interest.
We live in a probabilistic universe where the laws of probability are used for virtually all predictions, especially when it comes to human behavior. For example, employers use past work history to make predictions about employees' future performance. There are no guarantees, only probabilistic predictions. Some human behavior can be predicted with close to 100% probability, such as the use of the bathroom at least once during an 8-hour shift by an employee who drinks two cups of grande half-caff cappuccino every hour. Whereas other behavior has a very low probability of prediction, such as running through the office naked by an employee having a nervous breakdown. The main point is, being predictable, especially when referring to human behavior, in no way implies certain knowledge of outcomes. It is all about probabilities.
As mentioned, behavior is not just the result of will but is also the result of psychological, physiological, and biological processes. This means that even if will is governed by strict determinism, chaos, or some form of indeterminacy, predictions of behavior can still be made. For example, if a person is given a substance to induce vomiting, vomiting will almost certainly occur regardless of will.
Even if we were to hold to the belief that the will was 100% determined, and that our actions or behaviors were a perfect reflection of our will (which we now know that they are not), in no way would this mean that prediction of the actions of an individual if we know their will is possible. If human behavior were 100% determined, it would reflect a chaotic system, or a system that is deterministic, but technically unpredictable because small variations early in the casual chain that lead to substantial changes. A great example is the weather. The weather is ultimately a deterministic system, but one with so many variables that accurate prediction more than several days out becomes impossible. Like predicting the weather, accurately predicting human behavior, especially longer-term behavior, can be impossible, even if it were 100% deterministic.
There is an ongoing debate about the nature of quantum indeterminacy or what might be considered "true randomness." Some believe that there really is an indeterminate component of nature that is and always will be impossible (in the strictest sense of the word) to predict. Others follow Einstein and believe that what we currently understand as randomness, is really just uncertainty due to some "hidden variables." The current model that appears to be accepted by most physicists is that true randomness really does exist in nature. Because of this, what many academics refer to as "determinism" is understood to have this fundamental indeterminacy at the quantum level. Some people try to sneak "freewill" in here, but this is complete conjecture. In no way does indeterminacy or randomness imply anything close to the layman's notion of freewill. Further, this fundamental indeterminacy might play a part in the unpredictability of behavior—at this point, we just don't know.
Now to directly address the questions. "If our will is determined in predictable ways," let's keep in mind that predictable is based on probability, so any outcome is possible; "...then why do people act so unpredictably and not in their best interest?" As I have shown, there is not a clear relationship between the will and behavior, meaning that will can be 100% determined and behavior can still be unpredictable. Also, not acting in one's best interest is very often the more predictable behavior (as in a mother risking her life by jumping into a cold ocean to save her young child who fell off the boat). "Why do soldiers fall on grenades to save others?" Research has shown that these kinds of acts of "extreme altruism" are generally guided by intuition rather than rational thought (Rand & Epstein, 2014). This intuition is understood as a result of biological altruism, which is an evolved behavior, ultimately encoded in our genes (Okasha, 2013). This kind of behavior is further enforced by environmental factors such as the reverence of this kind of altruistic behavior in society and promises of rewards greater than life. Think of jihadist martyrs who give their lives for what they believe is the will of their god. Their culture enforces the idea of a greater benefit (eternal life and glory), in which case one can argue that what appears as altruism is really self-interest. From a secular worldview, the concept of symbolic immortality or what Abraham Maslow dubbed transcendence can lead a person to understand that their legacy can be of greater value than their life.
"Why do people raised in abusive homes end up productive members of society?" Based on existing research, I would say that children raised in abusive homes and life outcomes as measured by productivity in society are only moderately correlated, meaning that while someone might be raised in an abusive home, that environmental factor is not a strong influencer on future behavior as it relates to productivity in society. Environment is only about half of the equation; genes are the other half. Those children who are genetically predisposed to be more resilient, more optimistic, and more driven, are far more likely to overcome even the direst of environmental influences.
Within my answers, you will find the answer to the last question about acting "opposite" of our genes and environment. Our actions are precisely the result of our genes and environment, with the possibility of indeterminacy at the quantum level. The confusion arises when we ignore either the genetic or environmental component of behavior (we shouldn't), assume there is a simple relationship between the will and behavior (there's not), assume that our genes and environment cause us to always act within our best interest (they don't), assume that determination necessitates predictability (it doesn't), and see predictability as a binary construct rather than a probabilistic one. Once we understand these things, it is difficult to object to determinism as it relates to human behavior from a scientific perspective, although it may not make accepting determinism any easier from an intuitive perspective.
Reason: Book I - A Critical Thinking-, Reason-, and Science-based Approach to Issues That Matter is based on the first two years of The Dr. Bo Show, where Bo takes a critical thinking-, reason-, and science-based approach to issues that matter with the goal of educating and entertaining. Every chapter in the book explores a different aspect of reason by using a real-world issue or example.
Get the book, Reason: Book I - A Critical Thinking-, Reason-, and Science-based Approach to Issues That Matter by Bo Bennett, PhD by selecting one of the following options:
Enroll in the Daily Doses of Reason Online Course. This is passive course where you are sent one lesson per day by e-mail. There is no required interactivity. Each lesson averages just a few minutes.
Enroll in the Psychology of Woo Online Course. This is a crash course, designed to help you understand why your brain favors magical explanations over rational ones.
Have a podcast or know someone who does? Putting on a conference? Dr. Bennett is available for interviews and public speaking events. Contact him directly here.