How does craving cause self-identity or self-habit? From craving, there arises clinging, then from clinging, there arises existence or becoming, and then from becoming, we get the birth of the self-identity or self-habit.
But how does craving really cause self-identity or self-habit? How are they connected?
Does self-identity or self-habit arise out of a collection of likes and dislikes? How is that so?
It's kind of complex and would take a long time to explain in full details, but here's a simplified version:
There's a chain of reifications leading from craving to selfish action to self.
This is what was supposed to be explained in Dependent Origination but unfortunately most of the detailed descriptions  seem to be lost. From bits and pieces available in Theravada and Mahayana traditions we can try and recover what the full explanation probably looked like.
The exact sequence of reifications is likely impossible to determine, indeed that would require a detailed record of a developing mind, experience by experience and thought by thought, but getting at that level of details is not important anyway. What's important is to understand the general principle, the mechanism. Without further ado let's dive in.
When we crave something our mind projects a memory of a past experience onto an imaginary contact with an object. We reify this projection as &quot;that object is nice&quot;. There's no &quot;nice object&quot; in reality, both &quot;nice&quot; and &quot;object&quot; parts come from our mind. The &quot;object&quot; is a reification as explained in my Emptiness answer. &quot;Nice&quot; is a past memory turned into an imaginary quality. Combining the two parts together and playing a game of make-believe pretending that there's in fact an actual &quot;nice object&quot; - is reification.
When mind gets obsessed with this idea of &quot;nice object&quot; it keeps coming back to it again and again. It keeps feeding this reification by adding more and more imaginary details and associations. It imagines the circumstances that would precede a contact with the object, a kind of automatic planning. Then at some point it elevates this obsession to the status of intent. That's when we feel that we have made up our mind, decided to pursue the object, made it our goal. This is the second reification, of obsession becoming an intent, a fixation on a plan of action towards a goal.
(Of course when I say &quot;when we crave something the mind gets obsessed and keeps coming back&quot; or &quot;the mind imagines&quot; etc. - the subject of such sentences is only a figure of speech. There's no mind apart from its content; the cravings, obsessions, reifications, projections - are the mind. In other words, the mind is not an agent that does things, it's just a process that's &quot;happening&quot;.)
Then as we pursue the object and obtain it, we navigate the space (either physical space or the space of intermediate objectives) to get closer and closer to the desirable object. As we navigate the space we have to track our progress. We have to evaluate our position against the background of the circumstances. As we do that, we mentally &quot;split&quot; the totality of our mind into &quot;the world&quot; (our idea of the world to be precise) and the subject of navigation whose position we're tracking. The world serves as a semi-static background for the imaginary point moving towards its goal. We then reify this moving point to the status of &quot;I&quot;.
Craving for an experience (just like its negative twin, aversion, or craving to get rid of something) creates motivation to act deliberately and selfishly - towards a goal. Deliberate pursuit of a goal requires position evaluation and status tracking, which creates an imaginary pair of &quot;object &amp; its background&quot;: the world vs the current position. This position is what gets reified as the self.