Actually many wild ducks have generally brownish or greenish-greyish feet, though some have fetching red or pink feet. The nice yellow or orange feet of say, white Aylesbury ducks may come with their white plumage, but possibly there was some selection for colour.
Where wild species have vividly coloured legs I should expect there to have been some sexual selection for dressy drakes and ducks, but that is not always clear. Some birds like blue-footed boobies actually flaunt their blue feet most comically in courtship, though I don't know of any ducks with similar behaviour.
So I'll leave it at that before putting my foot in it too deeply.
Jon