The smaller flute, the one in the chapel scene, that one came from Kung Fu. It’s a much smaller flute. That one was made by Michael Greene. It was he who taught David how to make bamboo flutes.
Michael Greene tells a story in the book, The Kung Fu Book of Caine."
“I was living up in Laurel Canyon,” Greene recalls, "and I had this wonderful grove of bamboo. I had been making bamboo flutes on and off since the early 1960s. David approached me and said that he needed a good bamboo flute for the series. And then as I would be making them, he’d give them away-sometimes before he would even use them. So it almost became a joke . . . like some kind of out-of-the-ordinary production line."
Also Carradine explains that the philosophical reason for carrying the flute was that a Shaolin master is supposed to embrace some sort of art form. since Carradine is a musician, he thought Caine could play the flute. So, one day, he started carrying the flute around with him during his scenes, and no one argued with him about it. Soon enough, the flute was being incoroprated into Kung Fu scripts.