The implied comparison to English by trade, is meaningful. Some users are teachers by trade and may be able to explain this better, but as a matter of etymology I'm afraid this is obscure.
Von can be understood to mark genitive, like the English cognate of. Of course, the fact that it is frequently used in passive constructions where English uses by, is remarkable: Der Satz wurde von dem Lehrer an die Tafel an die Tafel geschrieben (formally dative). Compare the aphorism, Von der Hand in den Verstand (written by hand, to better understanding, or stilted, literally: from the hand into the mind).
I agree that it doesn't make much sense with von Beruf. This is a phraseme which is to some degree opaque, doesn't work like that with other nouns. It doesn't need an explanation to be used, because the meaning is clear. Chances are that etymology can explain it by (from?) comparison with other phrasemes, see perhaps Grimm's Deutsches Wörterbuch (and below1).
However, it does not explain the comparison with English by, or the precise meaning of Beruf, as I expect the genitive is most salient with belonging to a group, ie. a guilded trade:
- What is your position called by the trade.
For reference, see für (for, which is related to from)
- Was bist'n du fü'an Typ? (often derogatory, Was bist du für einer, What are you supposed to be?)
Since von Berufli is missing an article, the phraseme had probably ossified long before, when articles weren't necessary, and subsequently substituted with different nouns.
By the way, it is notable that by is related to Be- if you want to follow the common surface analysis of Beruf.2
1: Comments have challenged the notion that genetive would be a meaningful interpretation. See otherwise Grimm (DWB: Beruf), towards the end, no comment: "das ist gar nicht meines berufs, amts."
In particular, it would be most meaningful to read *was? * as a genitive question, wessen, or instrumental (obsolete), anyway with word order that is not current:
- ? Von wessen Beruf bist du?
This might follow from the usage of the verb and participle.
Although it is true that the verb berufen is often commanding dative with preposition von, ie. the dative object is commanded by the subject, which is most relevant for the passive or middle voice (emphasis mine)
"Ireneus spricht, das brot sei nicht schlecht gemein brot, nach dem es von gott genennet oder berufen ist, sondern eucharistia. 3, 371"
this is ambiguous while dative and genitive are merging, since pronouns have been innovated:
"liebevoll von ihr berufen
huldigt alles seiner pflicht.
Bürger 2ᵃ"
"beide wider ihren beruf in die liebe verwickelt wurden. maulaffe 1."
and because von Gottes Gnaden has its own legacy, thus as adverbial particple
"so ist ein erbar rath zu Nürmberg so berufen von gottes gnaden mit weisheit und gerechtigkeit, dasz herzog George ir meister nicht sein sol. Luther 4, 337ᵃ"
Pfeifer (etymwb: berufen) argues that Luther famously spread forms that replaced other usage.
This requires further research (or more modern references).
There is one construction cited that is typical without article (emphasis mine):
"die liebe zur kunst ist von jugend auf meine gröszte neigung gewesen, und ohnerachtet mich erziehung und umstände in ein ganz entferntes gleis geführet hatten, so meldete sich dennoch allezeit mein innerster beruf. Winkelmann 3, xiii"
See also von Kindesbeinen an; von daher or von dem her, von der Warte aus, coeur, hehre Ziele, etc. etc.
2: Without going into detail, I propose instead that this has to be compared to to be and credo, ie. Lebensmotto, Daseinsberechtigung, smh.
Conclusion: This can't possibly be explained in modern terms by the preposition von. It is by now a set phrase with particular meaning: Was ist dein Beruf.
[DWB] Deutsches Wörterbuch von Jacob und Wilhelm Grimm. Lfg. 7 (1853), Bd. I (1854), Sp. 1530-1532. Zitiert nach https://www.dwds.de/wb/dwb/beruf
[etymwb] „berufen“, in: Wolfgang Pfeifer et al., Etymologisches Wörterbuch des Deutschen (1993). Zitiert nach https://www.dwds.de/wb/etymwb/berufen