When they want to play songs.
You’re right, from a mechanical perspective, the instrument loses its place in combat when you can focus your spells with a sword.
And this seems to diminish something that seems to be a thematic core feature of the Bard class. I’ve played a swords bard before, I know what this feels like. I found that using a variant rule from Xanathar’s Guide to Everything really encouraged me to step into role playing and use my instrument in clever ways outside of combat.
In the section in tool proficiencies in Xanathar’s Guide, we see:
To make tool proficiencies more attractive choices for the characters, you can use the methods outlined below.
Advantage. If the use of a tool and the use of a skill both apply to a check, and a character is proficient with the tool and the skill, consider allowing the character to make the check with advantage. This simple benefit can go a long way toward encouraging players to pick up tool proficiencies. In the tool descriptions that follow, this benefit is often expressed as additional insight (or something similar), which translates into an increased chance that the check will be a success.
Added Benefit. In addition, consider giving characters who have both a relevant skill and a relevant tool proficiency an added benefit on a successful check. This benefit might be in the form of more detailed information or could simulate the effect of a different sort of successful check.
Using these rules, I felt more inclined to pick up my viol and lay down a nasty jam. I knew I could expect advantage on a performance check, and rolling those checks just felt good. But this is just my experience, if you aren’t into roleplaying a musical bard that’s fine.
I had a great time rolling a natural 20 while playing the classic fiddle tune “Asmodeus Went Down to Waterdeep”.
Your instrument is magic.
If you happen to have had the good fortune of finding a magical instrument, you will almost certainly be getting some use out of it, even in combat. The sundry Instruments of the Bards all allow you to cast a diverse collection of spells once per day, as well as some other benefits. Notably, every Instrument of the Bards allows you to cast fly, invisibility, levitate, and protection from evil and good, as well as each having a unique list of additional spells.