When I watched Mario Mandžukić’s strike arch over the Real Madrid goalkeeper, I thought, Wow … maybe.

Then it hit the back of the net, and I thought, O.K., maybe this is our chance.

It was a magnificent technical sequence from our players in the build-up, and just a beautiful finish from Mandžukić. In my mind, it is a goal that will never be repeated. It shows the difference it takes to be a club in a Champions League final. You can’t just be great. You have to be special.

We have special players. Unfortunately, Real Madrid have many of them. By the second half, I knew we just didn’t have the tools or the pieces we needed. We had two players who could barely stand on their feet due to injury, and Real Madrid played a very smart match. They were relaxed. They were comfortable.

To reach the final, you need talent and luck. To win it, you need to be the better team. And this may sound strange, but I actually walked off the pitch that night with peace of mind. Because I knew we weren’t the better team. It was as simple as that.

I left Cardiff with the team and returned to Italy. The next evening, when I got home, I had to ask myself a very hard question: Is this the end of the road? Is this as far as I can take this team?

Matthias Hangst/Getty Images

I wondered if I should write the final chapter to my story at Juventus. Part of me was thinking about walking in on Monday and respectfully resigning.

Then I thought about why I became a manager in the first place.

You see, we must go back to when I was 14 years old. That’s when things got hard. When I was just a little boy, I remember life being pretty simple. I was a happy, quiet kid. My best memories were of my grandfather taking me to the horse track in Livorno with him. As a kid, that’s all I can remember: Horse track, football, maybe eating dinner with my mother. I didn’t like school, but school wasn’t too serious yet.

Then, when I got to be 14 years old, everything got serious.

“Massi, you can’t skip school! You need to take these exams! You need to sit still and learn about Napoleon!”

I hated it. Hated it.

I remember sitting in class one day, and the teacher was mad at me about something, and I had this realization. I remember saying to myself: I am not meant to be a good student. But I could be a good principal.

Maybe every football manager dreams of being a school principal — il preside — I don’t know.

Matthias Hangst/Getty Images

Even when I was on the football pitch as a teenager, I wanted to be the teacher. To be honest, I was … unruly, let’s say. (Some managers may have had another word for it.) I had a few passionate discussions with my own coaches, but it wasn’t for more playing time or anything like that. It was because, even then, I wanted to run the team my own way. When I retired as a player and expressed an interest in managing, there were a lot of people who thought it would never work.

Even when it came to my first job as manager, I turned down the very first offer I received, from Pistoiese nearly 20 years ago, because I didn’t want to sit in a classroom. The rule there was that I had to go to school for a month and spend five hours in class every day to get my coach’s license. I was having flashbacks to being 14 again — nightmares! Instead, I chose to go to Coverciano where I could get the license in 15 days. I only had to sit in class for two hours a day, and the rest of the time I coached.

Maybe I’m a little headstrong, but I think, especially now, and as much as the game’s changed, that’s what you need. The media, they always talk of formations. They talk about maths.

3-5-2.

5-4-1.

4-2-3-1.

“Mr. Allegri, what will you choose? We must know.”

On the pitch, it is much more complicated. A 3-5-3 can be a 3-5-3 when you have the ball, and then when you don’t have the ball, you might need a 5-4-1. Or a blah-blah-blah.

What is important is shape and discipline and instincts. Your instincts are most important, I think. When I don’t trust my own instincts, when I doubt myself, that’s when I make mistakes. As a manager, you learn the most from failure. When I think of the most important moment of my career, it did not have anything to do with the scudetto or the Champions League.

It was the day I walked into the offices at A.C. Milan and I was fired. It was not a surprise by any means. I knew I was going to be sacked. They were respectful. They told me face-to-face that I would no longer be the manager. But that didn’t take away from the disappointment. You know in your head that being fired is just part of life as a manager, but it doesn’t stop you from feeling, in your heart, that you failed.

When I left Milan, I saw it as a failure of my work.

MICHAL CIZEK/AFP/Getty Images

I am sometimes perceived as cold, but in reality, that’s a decision on my part. You must have a certain detachment as a manager in order to keep moving. I love football, and I find joy in my work — it’s why I keep returning to it every morning — but it’s not my life 24 hours a day. The most important time of my day, no matter what, is 9 a.m.

Well, actually, the most important time of my day is 7 a.m., when I have my espresso. But the second most important time is 9 a.m., when I take my young son, Giorgio, to school. It may be different for others. But for me, I cannot be a manufactured manager. I cannot be something I am not. I can only be who I am.

When I first arrived at Juventus three years ago, I didn’t change much at first. The club had a lot of success under Mr. Conte. But slowly, as new players arrived, I moved things around, building the team as I saw it — areas where players could work together, how we could be stronger in attack, how we could be tactically flexible.

And that season we reached the Champions League final together. It felt like the opening night at La Scala. The work that goes into it. The number of people watching. The atmosphere, the emotion. The anticipation. There is nothing quite like it. It was like an opera.

If only it didn’t end in a loss to Barcelona. I was bitterly disappointed, but I thought I had learned my lessons from that defeat.

Thomas Eisenhuth/Picture Alliance/dpa/AP

When we made it to another Champions League final against Real Madrid this season, I really thought I had worked out what we were missing and what we needed to do, technically and tactically.

Especially when Mario scored his brilliant goal, I thought, Maybe this is our moment.

Clearly, that wasn’t the case.

When I got home after that defeat, I had to think hard about whether to continue. I thought about why I had become a manager in the first place. I also thought about my grandfather. He was a hardworking man — a stonemason. When I was a boy, he used to make sure that he was at all my football matches. It didn’t matter if we won or lost. He didn’t give a damn about the football.

He’d say, “Bel gioco, Massi. Ora vuoi andare a vedere i cavalli?”

(“Good game, Massi. Now do you want to go see the horses?”)

He never ever even asked me about the game. He cared only that I was having fun, and that he was there to see me.

These are the values that I have inside me. There’s so much pressure at this level of football, and there should be. But I try to remember why I do this. I don’t think of myself as a manager. I think of myself as a youth coach.

I do this because I love teaching. It is truly the joy of my life. I like making players better and smarter.

So when I thought about this Juventus squad, my decision became quite personal. I know I still have a lot to prove. And I know I still have a lot to teach.

So that night, before I went to bed, I decided that if the club was on board with my strategy and we could move on together, then I would stay on.

The next morning, my head was clear. I went to my office at 7 a.m. and had my espresso. It was a new season, with new opportunities. A lot has been said in the media about this team and the players. What we can do. What we cannot do.

Imago via ZUMA Press

For me, I look at Paulo Dybala and Gigi Buffon. In a way, they are the symbol of this team.

I see Dybala, like a bright boy about to start his first year in school. Buffon, with a World Cup, is about to get his Masters degree. One with his career ahead of him, and one near the end. One who wants to show that he can be one of the greats in Europe. One who is already a great, but wants to end his legacy on top.

I know we can shed the scabs from Cardiff. I know we can have a great season. I know we can have a great Champions League campaign.

I know what tomorrow morning will be. And the next morning. And the morning after that.

So now we just continue to work. We’ll try to make it to opening night at La Scala once again. The good thing about the opera is that there’s a new show every year.