In public buildings, in the UK at least, the principal entrance to a building must now be automated on PIR or button and open outward for ease of disability access. YMMV, of course.
Again, in the UK, you can have a final exit escape door open inward, if described and justified suitably in the Design & Acccess statement (or management document) for the building, if the room the exit is serving is designed to have an occupancy of less than 60 people. Any increase (or potential increase) in this number and the doors must be hung to open out in direction of escape.
It’s generally always preferable to have an outward opening door, but if, for example, the building is built right on a public pavement, the local Highways Agency or Planning Authority may not allow an external door to open over their property or restict the width of their pavements, so the door has to open inward, potentially restricting the available use of the internal spaces. (It could be recessed and still open out, but then this falls foul to security concerns about anti-social behaviour happening in the externally formed alcove etc..)