If your native language does not identify pronoun cases by declension but merely distinguishes between subject ('I', 'we') and object pronoun forms ('me', 'us') as English does, a practical way to relate to the bewildering accusative versus dative case distinction is that the former typically denotes the direct object of a sentence and the latter its indirect object. The full rule framework on appropriate case usage is fussier than that simplistic explanation, I'm afraid, but let's stick with the direct / indirect object roles for now.
The sentence ich darf mich vorstellen contains but one object: Yourself, the direct object being introduced. In this example, the fact that you are both subject and object of the case matters little in terms of grammar. If a third person was involved -- doing the introducing, or being the one introduced -- the direct object status remains consistently marked by an accusative pronoun; be it ich darf ihn vorstellen or er darf mich vorstellen. Since you're introducing yourself, the mich pronoun is reflexive.
If you wish to add specificity to your sentence, e.g. by stating to whom you're being introduced, you're adding an indirect object; as in English I may introduce myself to him, which becomes ich darf mich (acc.) ihm (dat.) vorstellen, or with reversed roles, er darf sich (acc., reflexive) mir (dat.) vorstellen.
The other sentence about choosing some food for yourself is also purely about role-play between a direct object (the food chosen), and the indirect object the food is chosen for (namely yourself, as the sentence is also reflexive). Therefore ein Essen as direct object is marked by the accusative case whereas mir (for myself) as indirect object carries dative case markings.
That is, in essence, all that explains the grammatical distinction. Noun and adjective case endings in 'the awful German language' to quote Mark Twain are quite washed out and often rely on an inflected article for clarity, which is basically why this aspect of German grammar is so incredibly difficult to master with fluency - you have my full sympathy! Pronouns however are more distinct and unambiguous; ich-meiner-mir-mich, or er-seiner-ihm-ihn, etc. So it's really a question of mapping form (inflection/declension) over function (direct vs indirect object).
German tends toward heavy use of reflexive verbs. This is nothing particularly German (as in, "so precise...") but is actually common for many Indo-European languages - English, as a matter of fact, is the exception here. For that reason constructions like sich waschen, sich rasieren and sich anziehen for to wash / shave / dress are common. The same applies to sich etwas aussuchen (to pick something for yourself, e.g. birthday dinner). The add-on '...oneself' feels superfluous to English usage, where a direct object to these mundane tasks is only deemed necessary if you're assisting someone else. The absence of a direct object from English marks clearly and unambiguously enough that you are the one being washed, shaved, and dressed... by none other than yourself!
It's worth internalising how English grammar works in contrast to that of other languages. Even though French and Spanish have lost Latin's case inflections, they do still distinguish very clearly between direct and indirect object through pronoun markers, and (often) also use reflexive verbs (se laver / lavarse or s'habiller / vestirse to stick with the above morning routine examples; French, like German, front-loads the reflexive pronoun se whereas Spanish tags it at the end). English does not; reflexivity is implied by the absence of a pronoun.