Different behaviour of a mesh coming from generate_mesh() resp. UnitSquareMesh()?

Part one of the tutorial is a pure GMSH tutorial.
Part two of the tutorial, with title 2. How to load this mesh into dolfin-X without IO is on how to load the mesh into dolfin-x without meshio. As you are using dolfin, you need to use meshio`, as shown Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio - #7 by dokken