When you own it.
Let's think of when you own a new car. Would you take care of it? Probably yes, you wouldn't recklessly drive (if you don't have the skills) and potentially damage the car.
Same with owning a house. If you own a house, you will take care of it. By placing new furniture, cleaning it, throwing out the trash, and more. Why? Cause you own it.
I believe that people do their best work when they have ownership of it. When their name is on their work they have accountability and responsibility. When to their work succeed they get recognition. But more importantly, when their work fails, they get the blame.
Everybody to some degree doesn't want to fail. Especially when their name is on it. That is why they work hard. But that only happens when they have ownership.
If they don't have ownership, they will feel a lack of responsibility, accountability, and trust.
Let's imagine a situation where you get hired and you don't own anything. You are just the guy or gal who fixes bugs and add features of all the products for the company. So you can work on products A, B, C, D, E, and more. You have no ownership of one of the products or an even aspect. Will you do your best work?
I don't believe so.
Now imagine an opposite situation where you get hired. Then your manager tells you the following thing:
"You are responsible for product X. You will become the expert of product X. Whenever there are problems, questions, or adjustments about product X you are the guy/gal we reach to."
Reading this, the person who is responsible for product X will have accountability and responsibility. Maybe even more importantly the trust of the manager that he/she will be able to own it.
Do you believe the person will do their best work?
I believe so.
I believe that ownership is important. With ownership, your name is on the product which translates to accountability and responsibility. Then you will flourish and so the product as well.
Within software development, there are many forms that you can have ownership of. It can be DevOps, an application, a server, a database, a dashboard, a feature, or anything else. Find what you want to own and do your best work with it.