ANALYSIS/OPINION:

When Donald Trump’s Florida lawyer Paul Rampell first proposed turning the future president’s Mar-a-Lago estate into a private club, Mr. Trump pronounced the idea “dumb.” Over the next month, Messrs. Rampell and Trump argued back and forth about the idea until Mr. Trump finally agreed with Mr. Rampell.

What happened in between provides an anatomy of how Mr. Trump makes decisions and gives insight into what sometimes seems like chaos in the Trump White House.

Mr. Trump bought Marjorie Merriweather Post’s 114-room 1927 estate for $5 million in 1985. A white elephant, the estate cost $1 million a year to maintain. By 1991, Mr. Trump wanted to subdivide the estate’s 20 acres into lots. He consulted Mr. Rampell, who argued that the best use of the property would be a private club.

Mr. Trump derided the idea, saying it sounded like a Studio 51, a nightclub that would not be attractive in Palm Beach. Mr. Rampell said that unlike a nightclub, club members could dine and celebrate weddings and other occasions. Mr. Trump could create a spa facility, add tennis courts, and provide beach services.

Mr. Rampell, who is Jewish, said that unlike some of the other private clubs in Palm Beach, the club would admit Jews and blacks. Mr. Trump countered that no one would want to join the club if it did not have a golf course. Mr. Rampell said other clubs in Palm Beach without golf courses do just fine.

On and on the argument went. After meeting with Mr. Rampell in person at Mar-a-Lago, Mr. Trump called him almost every day over the next month, sometimes speaking with him several times a day. As he does in the White House, Mr. Trump consulted a range of other people. He told Mr. Rampell that friends who are in real estate told him the idea would never work. Several other lawyers also threw cold water on the idea.

In determining legal strategy, Mr. Rampell says, Mr. Trump consults a number of lawyers, then makes up his mind. Often no one can guess the outcome until Mr. Trump announces his decision.

In canvassing different opinions, Mr. Trump does not necessarily limit himself to experts. I remember when my wife Pamela Kessler, a former Washington Post reporter, and I flew down with Mr. Trump to stay at Mar-a-Lago as part of the research for my 1999 book “The Season: Inside Palm Beach and America’s Richest Society.” Mr. Trump drove Pam and me in his Durango SLT to a $2.5 million waterfall being built at his new Trump International Golf Course in West Palm Beach.

Trump had to decide what color rocks to use. He liked the whiter ones, but he asked Pam and me and the workmen which color we preferred. We all liked the reddish ones, so Mr. Trump went with them.

In the days leading up to his 2017 New Year’s Eve party, when I chatted with Mr. Trump at Mar-a-Lago about problems in the Secret Service and other matters, he asked my opinion on Israeli settlements and the two-state solution.

I know as much about the Middle East as Mr. Trump knows about the Talmud, but I gave my opinion. Indeed, that was the way Mr. Trump first learned about Mar-a-Lago, chatting with his limousine driver and asking about properties for sale.

“Trump constantly canvasses opinions from people around him, even security guards or housekeepers,” Mr. Rampell, who has turned down over 100 requests for interviews about Mr. Trump, tells me.

“It was fun to argue with him,” he says. “He would use these great New York expressions like “Fuggetaboutit” and “Are you outa your mind?”

When Palm Beach Town Council members opposed turning Mar-a-Lago into a club and later tried to impose crushing restrictions on it, Mr. Trump enlisted Mr. Rampell to use the carrot and the stick.

Mr. Trump believed that the prejudice of Palm Beach Town Council members, some of whom belonged to clubs that discriminate to this day, was in part behind their opposition to his plan to turn the estate into a private club that would not discriminate.

Mr. Rampell sent DVDs of “Gentleman’s Agreement,” a movie about anti-Semitism in the 1940s, and “Guess Who’s Coming to Dinner,” about anti-black prejudice, to the mayor and to each of the town council members.

Guided by Mr. Rampell, Mr. Trump invited members of the town council to play golf or tennis with him. He invited them to parties with beautiful young women at Mar-a-Lago. Mr. Rampell helped raise money for one council member’s campaign and let her use his office for phone banks.

Mar-a-Lago opened as a club in 1995. The club makes a profit of $15.6 million a year. The property, which fronts on both sides of the 3.75-square-mile island, is worth an estimated $300 million.

If Mr. Trump consults a wide circle of people before making decisions, he is also loyal to them. One day, Mr. Rampell opened the door of his Palm Beach home to find an expensive computer from Mr. Trump for his son’s birthday. Mr. Rampell later learned that Mr. Trump had gone shopping for it himself and delivered it himself.

“He is very open-minded and has a humanitarian side to him that people don’t see,” Mr. Rampell says. “He will pay off people’s mortgages and hospital bills. At the same time, he is willing to take risks. Other lawyers told him the town would never approve Mar-a-Lago. He went ahead against long odds.”

• Ronald Kessler, a former Washington Post and Wall Street Journal investigative reporter, is the author of “The First Family Detail: Secret Service Agents Reveal the Hidden Lives of the Presidents” (Crown Forum).