Rain Man

Charlie Babbitt is in the middle of importing four Lamborghinis to Los Angeles for resale. He needs to deliver the vehicles to impatient buyers who have already made down payments in order to repay the loan he took out to buy the cars, but the EPA is holding the cars at the port due to the cars failing emissions regulations. Charlie directs an employee to lie to the buyers while he stalls his creditor.
When Charlie learns that his estranged father has died, he and his girlfriend Susanna travel to Cincinnati, Ohio in order to settle the estate. He learns he is receiving the 1949 Buick Roadmaster convertible over which he and his father fought and his father's rose bushes, but the bulk of the $3 million estate is going to an unnamed trustee. Through social engineering he learns the money is being directed to a mental institution, which he visits and where he meets his older brother, Raymond, whose existence he was previously unaware of.
Raymond has autism and adheres to strict routines such as always watching The People's Court, which he refers to as "Wapner" after the judge who presides over the show. He has superb recall but he shows little emotional expression except when in distress. Charlie spirits Raymond out of the mental institution and into a hotel for the night. Susanna becomes upset with the way Charlie treats his brother and leaves. Charlie asks Raymond's doctor for half the estate in exchange for Raymond's return, but he refuses. Charlie decides to attempt to gain custody of his brother in order to get control of the money.
After Raymond refuses to fly to Los Angeles because he remembers every airline crash and is worried about getting hurt, they set out on a cross-country road trip together. During the course of the journey, Charlie learns more about Raymond, including that he is a mental calculator with the ability to instantly count hundreds of objects at once, and make nearly instant calculations on the exponential level, far beyond the normal range for humans. They make slow progress on their trip because Raymond insists on sticking to his routines, which include watching "Wapner" on television every day and getting to bed by 11:00 PM. He also objects to traveling on the interstate after they pass a bad accident. Charlie also learns that, like him, Raymond loves The Beatles. One night while staying in a hotel, Charlie begins to draw a bath, and Raymond has a breakdown, screaming and desperately attempting to shut off the water, and incoherently yelling about "hot water, burned baby." It is revealed that Raymond actually lived with the family when Charlie was young, and Charlie realizes that the comforting figure from his childhood, whom he falsely remembered as an imaginary friend named "Rain Man", was actually Raymond, who was sent away because he had accidentally severely burned Charlie with scalding hot water in the bathtub as a little boy.
After the Lamborghinis are seized by his creditor, Charlie finds himself $80,000 in debt and hatches a plan to return to Las Vegas, which they passed the night before, and win money at blackjack by counting cards. Though the casino bosses are skeptical that anyone can count cards with a six deck shoe, after reviewing security footage they ask Charlie and Raymond to leaveâbut allow Charlie to keep the money. However, Charlie has made enough to cover his debts and has reconciled with Susanna who rejoined them in Las Vegas. One morning, while Charlie is still sleeping, Raymond attempts to cook breakfast by putting frozen waffles in the toaster. He becomes distracted, though, and the toaster burns the waffles to the point of setting off the smoke detector, which sends Raymond into a panic. Charlie wakes up and is able to detach the smoke detector, but Raymond continues to bang his head against the door in his panicked state. Even after calming him down, Charlie resolves to seek more psychiatric help for Raymond.
Back in Los Angeles, Charlie meets with Dr. Bruner, who offers him $250,000 to walk away from Raymond forever. Charlie refuses and says that he is no longer upset about what his father left him, but he wants to have a relationship with his brother. At a meeting with court-appointed psychiatrist Dr. Marston (Levinson, in an uncredited cameo), Raymond is shown to be unable to decide for himself what he wants. Charlie stops the questioning and tells Raymond he is happy to have him as his brother.
In the final scene, Charlie brings Raymond to the train station where he boards an Amtrak train with Dr. Bruner to return to the mental institution. Charlie promises Raymond that he will visit in two weeks.

Question: Why is Charlie attempting to gain custody of his brother?
Answer: Get control of the money