... Why is the ballad named after Tam Lin, when he's little more than a male Damsel in Distress, and the female lead is the one who actually does much of anything?
Same reason "The Lord of the Rings" is named after Sauron. They don't do much in the story themselves, but they are the MacGuffin that motivates the main character(s) to carry out acts of general awesome badassery.
Also, because Janet and Margaret were kind of go-to names for princesses and the like. First person that told the story probably said something along the lines of "Alright, let me tell you about a story about our friend Janet and a Fairy named Tam Lin...."
Sleeping Beauty does even less in her story, but it's still named after her. It could be that a lot of early fairy tales were named after the "Prize" rather than the character.
The Legend of Zelda is like this too. Zelda rarely does something worth mentioning, yet every game is named after her.