I had several quotes from 5E Sword Coast Adventurers guide which shows that MOST paladins are sworn to a god. Its on page 2, 3 or 4 I think. Didnt bother to look for more sources, there were plenty in the first book in my d&d library that I checked.
Paladins have the option of pledging themselves to a God, A Cause, Pancakes, a 1972 Mitsubishi Colt, Rainy days, or The British Lawn Mower Racing association. As long as it doesn't conflict with their Oaths they can act as free agents.
Generally speaking a Paladin gains nothing by specifically pledging themselves to a God, unless they had worked out some sort of deal with that deity.
Personally I would go for the 1972 Mitsubishi Colt - that thing can really move.
Edit: It occurs also that Anders - who is a Paladin - claims to be a follower of Tyr - which we know is a lie. Anders left Tyr's service for Zariel at some point. I would propose that Anders pledged himself to Tyr in exchange for that Sword of Justice. It would also explain why he is so willing to part with it, as it is a reminder of his own failure.