Free throws are trained for during basketball practice. Other than players just standing around scoring, coaches will run drills to simulate game vibes.
A common drill is for a player to shoot 2 free throws and sprint to the other end to shoot 2 more. For every one they miss they have to go there back and there. Basically sprint a lap for each miss. There are two keys to practicing free throws.
players must have the legs worn as they would be in a game. This is obvious as you are not gaining much when shooting free throws fresh. Your feet and hips play a big part of keeping your free throw straight. If fatigued it is highly more likely that these will sway to left or right. Your quads and knees will effect the shot long or short. Again these are not effected much when you aren't fatigued.
player should only shoot two free throws at a time. Players already shoot significantly better for their 2nd free throw so shooting more is not practical as the hardest one to hit is the first one.
So yes they train all the time. Probably the biggest issue is how hard they fatigue themselves while training. Often this isn't even close to game situation. I actually remember watching Shaq practice free throws. He would shoot 5 then "jog" down to the other end and shoot 5. Well he would shoot 70-80% in practice and maybe better. Easy to see he wasn't practicing right. But again it may be hard to practice these perfect for pro players as this would hurt their resting.
But there is a big difference between free throws and penalty kicks. They happen a lot more often and are often not in stressful situations. There are only a very small percentage of free throws that are actually in clutch situations where in soccer each penalty kick is HUGE so we are comparing apples and oranges. There are definitely psychological issues in basketball but it is more about muscle memory and technique. For instance in soccer the player shooting can shoot with no goalie and hit close to 100% within 4 feet of the goal posts. But he has to shoot against a goalie so the ball may need to be closer or it may need to be shot faster. In basketball there is no other stress involved. It isn't like if a free throw is shot too slow there would be a guy jumping up to block it.
What is funny is that in basketball 80% is a great percentage. A team would be really happy shooting 80% and most are a good 5% points lower. There are just more moving parts affecting a free throw and it is a much smaller goal even though the act itself is easier.