Whenever, upon the creation of a district, any municipality therein or any county in which the district is located, which has theretofore authorized or incurred a bonded indebtedness for any work or improvement for which the district may incur a bonded debt, and the municipality or county thereafter sells the bonds or any portion thereof, the proceeds of the sale, may, upon the order of the appropriate board of supervisors or city council, be paid by the custodian into the treasury of the district. They shall be applied by the board, exclusively to the purposes for which the bonds were authorized by the municipal corporation or the county issuing them.