Mac Miller's demo comprised him singing some lyrics, but no chorus, over a very minimal track. He asked Jon Brion to add some more music. The producer told Apple Music
he started to play some stuff on the keyboard while watching the rapper's body language to see if he was happy or not. Miller responded enthusiastically, came into the control room and started singing the chorus over Brion's instrumentation. The producer loved it and told him to grab the mic so he could get it on tape.
Miller was a little unsure, at first, thinking the hook would suit more a different song, but eventually saw the sense in it and laid the track - chorus and all - down.