I am one of those people! Actually had my annual physical today and discussed this with my doctor. I try very hard to gain weight, but find it very difficult. I will often make month long efforts to do so, but achieve little results. I can spend an entire month, every single day, eating 6,000 to 8,000 calories per day. After 30 days, I will gain 2-3 pounds (1.5-2% gain of body weight). It is actually quite difficult for me to consume this much food in any given day! It takes a real conscious effort to eat this much, IMO. According to my Dr., my body mass index is "perfect" at 22% and he says, as such, I should be somewhat careful in such efforts as I am at the ideal point. So, I conclude that it is hereditary combined with certain habits (that are not necessarily good). There are three things that I do: I drink a fair amount of coffee (4-5 cups per day, with cream and sugar), I drink the equivalent of 4-5 cans (12 ou) of Coke per day (when I was younger I drank between 12-24 cans of Coke per day), I smoke! The coffee and Coke both speed up my metabolism (sugar & caffeine), smoking suppresses my appetite (but for me, drives my thirst or desire to consume beverages). I can't say whether there is a gene, a life style, or what. In my 30s, people told me it would change when I hit my 40s. In my 40s they told me it would change when I hit 50. I am now half way through my 50s . . . Obviously, I am thinner than I would like to be. Things that I don't do: drink much alcohol, snack, eat very many processed foods. I love red meat, bacon, BBQ, good cheeses, fatty foods, salt, but I don't like candy very much. I get a moderate amount of exercise. I am only 5'8" tall, a male. If I eat less than 2,500 calories in a day, I lose weight. Ideally, if I eat 3,000-4,500 calories per day, I neither gain or lose weight. I go to the bathroom 2-3 times per day and urinate 12-15 times per day. I try to eat every night right before I go to bed - usually this is the equivalent of two bowls of sweetened cereal with 1.5-2 cups of whole milk. I don't eat breakfast (except when I am making month long efforts to gain weight)! I sometimes worry that this sets my body up to conserve or change in a way that may contribute to my problem - but I find I'd rather have a couple of cups of coffee and smoke than take the time to eat breakfast before work. Overall, I am one of those people that eats and believes in a balanced, highly diverse diet. I eat fruit and vegetables everyday, but also eat meat every day. I don't believe in or get into taking all sorts of supplements - as I think they are a waste for people that eat diverse, well balanced diets. I also have seen how using supplements as an alternative to eating a balanced diet causes unintended harm and consequences to our bodies. I feed my body whatever it is that it is craving! I believe my body's cravings are a way for my body to tell me what it needs from a nutritional perspective. I will find if I am traveling for several days for work (which means eating at restaurants for every meal), that after a few days I will be craving a big salad, or fruit, or something (which may be less prevalent in your typical restaurant meals).
Overall, things that I consume a lot of, a disproportionate amount of (as a % of my intake):
Salt that I add myself to food (but I suspect it is FAR less than I would consume if eating processed foods)
Meat, red meat in particular
Olive Oil - we go through a LOT of olive oil
Sweetened cereals (captain crunch, cocoa pebbles, frosted flakes, apple jacks)
Coke (no, there is NO substitute, other than RC when I am in the mood for it)
Butter - my wife always asks why I add butter to nearly every dish I am preparing - because it makes nearly everything in the world taste better!
None of this is to say that I think I am good or lucky or anything of the sort. I know I have some bad habits and am intelligent enough to know I should change them (drinking too much soda and smoking) - but I simply have chosen not to - I am not a victim to anybody but my own choices in this regard. Though I did promise my Doctor that by next year's physical, I will have quit smoking. He replied that more people die every year from from being overweight and the problems it causes (especially the accumulation of fat around our organs - which roughly 20% of very overweight/obese people suffer from).
Because I have such a tough time keeping weight on or gaining weight, I think it has given me a better understanding or appreciation for people who have the opposite problem (obesity/weight gain).
I sometimes wonder if I should have my intestines and/or stomach tested for enzymes/bacteria types and the such to determine if this contributes to my scenario.