At least in Obama’s case, I would say that his faith did not shape his views. Let’s keep in mind, he did not start attending there until he was an adult, graduated from college. I would say that his views were shaped from his marxist mother, grandparents, friends and by his marxist (real) father. The last in a tenous way, via stories his mother would tell him about his father.
These views were already shaped when he decided that getting a little “religion” always helps a political career. And so, he set out to find a church that fit his leftist belief system. Before embarking on a political career.
Although I agree with the substance of your comments, there was no 'faith' to be imparted by his membership in the TUCC "church". Their gospel was one of racial grievance, and not of Christ Crucified and Risen - our Lord and Saviour. He went into that church with no belief, and that church did nothing to prick his conscience and point him towards the Lord.