Considering that everybody plays these melodies from a book, I see no difference in using it in a software. In fact most jazz musicians are making money by playing melodies that do not belong to them. So which is worse, practicing to a software that has the melody within it, or playing a gig and making money with other peoples songs/melodies? I personally think melodies should be an integral part of BIAB. Most people originally purchased band in a box in order to practice over chord changes that were based on songs.
When musicians play in public, the venue (site that hires the musicians) is responsible for paying copyright royalties.