In my experience, dotted-line structures are often project-based or reflect temporary circumstances, but even then they can wreak havoc on what would otherwise be a well-organized and clearly understood org chart.
Here’s more detail on pointer reports and the different use cases around them:
Source: Working at an HR startup for over a year and many interviews with clients on how best to represent them.