why use a perceptron when it seems multiple IF staments do the same thing
Machine learning (perceptrons or not) is all about automatically finding generic but correct rules, be it in the form of If-Else-Rules, encoded formulas, closest occurrences, or others.

The ML algorithm is just a way to (automatically) find this knowledge, whatever the representation may be. In another words, you use it to find the someValue of your example, based on your data. You don't need ML if you can represent such knowledge yourself.