You only need to read the Scrum Guide  to realize that the Scrum Master role is a coaching role. It involves coaching the Product Owner, the team and the organization.
Sadly, in many organizations, there is a growing separation between Agile coaches and Scrum Masters. This separation limits opportunities for Scrum Masters to coach. Agile Coaches' value comes from their extensive experience and knowledge of multiple Agile frameworks, organizational theory, and change management. Agile coaches are also extremely valuable during the initial stages of an Agile adoption. At these early stages, Scrum Masters may not even exist in the organization. Once experienced Scrum Masters are established, they can become the coaches because they also possess the desired coaching skill set.
Lyssa Adkins states in a podcast from Agile 2018  that the concept of Agile coaches has become superior to that of Scrum Masters. Some organizations have started to see Scrum Masters as second-order citizens, as administrative order takers. The emerging belief is that Agile coaches are the only ones who can help with complicated issues. Examples of these issues include conflict management, inception and release planning workshops, and coaching executives to support an Agile adoption. In reality, and as stated in the Scrum guide, all those activities are the responsibility of Scrum Masters.
Part of the problem is that many organizations are yet to see the value of full-time Scrum Masters. One "optimization" I often see attempted is to combine the role of a Scrum Master with another function in the team (tester, developer, user research, etc.). With limited and divided time, Scrum Masters can only do the most basic tasks of their role. Tasks that these Scrum Masters don't have time to do become a gap that organizations think they need to fill by bringing in an Agile coach.
Another common problem happens when organizations assign a Scrum Master to multiple teams. Scrum Masters in this situation risk spending a large part of their time scheduling and attending Scrum events for both teams.
With little to no time left for Scrum Masters to coach their teams and Product Owners, organizations risk losing agility as those teams potentially revert to more traditional ways of working and thinking. Teams might also develop practices that do not align with Agile principles and values. The process weakens when Scrum Masters are absent. There needs to be someone in a team that continuously nurtures the Agile mindset.
In the situations described above, organizations may think of bringing in an Agile coach to do the work Scrum Masters can't do. But what would happen if Scrum Masters were allowed to dedicate all their time and energy to the team, the product owner and the organization?
Coaching is typically an underdeveloped skill in the competencies of Scrum Masters and even Agile Coaches. Over the years, I have interacted with many Scrum Masters and Agile coaches, and often I come across great mentors and advisors. Not as often, though, do I meet someone who is a great coach. Often, I have observed Agile coaches and Scrum Masters do not clearly understand what coaching is and how it differs from mentoring and advising.
Lyssa Adkins also states in her podcast that "there is a marked difference between people who have put in the effort to build deep and wide coaching competency and those who have not done so. Organizations are becoming more discerning about who they engage in the Agile coaching role".
What is coaching, anyway?
“You cannot teach a man anything; you can only help him find it within himself” - Galileo Galilei.
Coaching is not a regulated field and there are many coaching definitions. Here are a few:
“Coaching is partnering with clients in a thought-provoking and creative process that inspires them to maximize their personal and professional potential (International Coach Federation).”
“Coaching is a unique opportunity to focus and move forward on your personal, professional or organizational goals through the exploration of ideas and candid dialogue with a confidential and unbiased thinking partner (Coaching@UBC).”
“Coaching could be seen as a human development process that involves structured, focused interaction and the use of appropriate strategies, tools and techniques to promote desirable and sustainable change for the benefit of the coachee and potentially for other stakeholders (The complete handbook of coaching ).”
My coaching philosophy is that only our clients truly know their motivations, desires and intentions. Our role as coaches is to co-create with the client an environment conducive to generating insights and new knowledge. Through inquiry-based conversations, coaches help clients create ideas about achieving their goals considering their situation, perception of their environment and understanding of the problem context.
Scrum Master in a coaching role
It is clear from the Scrum Guide  that Scrum Masters are not only coaches. They are also teachers, mentors, role models and advisors. These five different roles are what Agile 42 calls "Agile coaching stances" .
The foundation of the coaching stance is the trust we have in individuals and teams to enact change. We trust people's self-efficacy. In our coaching stance, we trust that our self-organizing teams and the individuals we interact with have all they need to design solutions to their problems or approaches to achieve their continuous improvement goals. As Scrum Masters, we are there to engage in conversations conducive to generating ideas and new knowledge.
A typical example of when Scrum Masters act as coaches is in Sprint Retrospectives. This Scrum event is, in fact, a team coaching session. We let the team define the agenda by helping them determine the session's focus. We then engage in a thought-provoking conversation where we ask powerful questions and use other coaching techniques to help the team generate ideas and decide on actions for the next sprint. Lastly, we help them find collective accountability for their agreed actions. This structure is typical of any coaching engagement.
In my experience, Agile coaches and Scrum Masters tend to do mentoring, advising and role modelling very well. However, I have observed that they do not provide enough coaching. Even Agile coaches and Scrum Masters, who have a natural ability to conduct inquiry-based conversations, sometimes lack the knowledge about how to engage in actual coaching conversations with individuals and teams.
Scrum Masters, you are all coaches. We owe it to our teams to become proficient in coaching! If you are a leader in an organization with less experienced Scrum Masters, consider offering them more opportunities to coach, perhaps through a mentoring program. If you are a Scrum Master looking to learn more about coaching, read a book, take some training, experiment and learn.
 Ken Schwaber, Jeff Sutherland. The Scrum Guide (https://bit.ly/2C78JJJ)
 L. Adkins, H. Dunsky. The State of Agile Coaching and the Competencies Coaches Need to Build (https://bit.ly/2Mh4mCr)
 International Coach Federation - About ICF (https://coachfederation.org/about)
 UBC Human Resources, Coaching @ UBC. (https://bit.ly/2jNjy9X)
 Cox, E., Bachkirova, T., & Clutterbuck, D. (Eds.) (2010). The complete handbook of coaching. Thousand Oaks, Ca: Sage Publications.
 Agile 42 Coaches, Hitchhiker's guide to agile coaching (https://bit.ly/38uokCt)