Such a tool could be used to add music to existing videos, or to add guitar accompaniment to an existing vocal track, sources ...
To play YouTube videos in the background while doing other things on your iPhone, you can use YouTube premium or Safari's desktop view mode.