encode is designed for situations in which you have a string variable, typically containing meaningful nonnumeric text (e.g., male, female), and wish to have the equivalent information as a numeric variable with labels. This goes way back in Stata history.
destring is designed for situations in which you have a string variable, typically containing meaningful numeric text (e.g., 1, 2), which you wish to convert to the numeric variable it should properly be. Usually, that variable is now string because of some mistake. Perhaps the mistake was yours, because what you initially typed in Stata's Data Editor was nonnumeric. Or, perhaps the numeric text is contaminated by nonnumeric text from some earlier operation (e.g., in a spreadsheet), and Stata spotted that.