This question already has an answer here:
I was wondering where "wildcard" in computing terms comes from ?
Note: Did not find it in etymonline.com and don't know of any similar resources to consult.
In some card games, you can have a wild card that the holder can play with any value of their choosing.
Hence, if deuces were wild, you could have three-of-a-kind with a deuce and two kings, by counting the wild 2 as another king.
The computing sense of characters that match any character is by analogy to that.