Currently working with several websites that use the same code template. Schema.org markup used for both of the websites is the same.
But site #1 is displayed with rating and site #2 is without rating.
What can be the reason for this?
Unfortunately, there is no single, unary factor that can be directly attributed to this, aside from the obvious syntax error in the markup (which I'll assume isn't the case). Instead, there are hundreds of factors that Google uses to determine what they display in search results and, with an index of over 30 trillion webpages, they've got quite the pot to pick from. The reality is that it's the result of a massive set of data being manipulated to provide the best information for the given search query and user, and it's completely at Google's discretion as to what's most relevant for that search query and user at that specific instance in time.
If you're interested in further investigating, I would recommend doing comparative analyses of the website in question and its main competitors. You can learn a lot from A/B testing and, from personal experience, it often correlates with quantity and quality of reviews, as well as the entity's social presence.