Python: similar mathutils.Matrix producing different translations
Use Quaternions for unique rotation

As well as the matrices being distinctly different, the quaternion rotations returned from your matrices are distinctly different. See this blurb here on Mathematics of Eulers

Matrices m1 and m2 displayed in 3D view using Maths Vis Console Addon


Adding some lines of code to your example, 

print('Rotations Quaternion')
print(m1.to_quaternion())
print(m2.to_quaternion())
print('Rotations Quaternion to Euler')
print(m1.to_quaternion().to_euler())
print(m2.to_quaternion().to_euler())


To get a quaternion representation of the rotation

Rotations Quaternion
&lt;Quaternion (w=0.2698, x=-0.0753, y=0.1302, z=0.9511)&gt;
&lt;Quaternion (w=0.2605, x=0.0147, y=0.0578, z=0.9636)&gt;
Rotations Quaternion to Euler
&lt;Euler (x=0.2136, y=0.2151, z=2.6118), order='XYZ'&gt;
&lt;Euler (x=0.1194, y=0.0018, z=2.6136), order='XYZ'&gt;


Notice only the Euler result for Matrix m2 corresponds.  Can decompose a Matrix into its components with Matrix.decompose() The rotation part is returned as a quaternion.  Here is an example that decomposes and recomposes the matrix m2

v2, q2, s2 = m2.decompose()

S = Matrix.Scale(1, 4)
for i, axis in enumerate(s2):
    S[i][i] = axis
m = Matrix.Translation(v2) * q2.to_matrix().to_4x4() * S

print(Vector(m.to_euler()) -  Vector(m2.to_euler()))
print(m2 - m)


Produces the result

&lt;Vector (-0.0000, 0.0000, 0.0000)&gt;
&lt;Matrix 4x4 (-0.0000, -0.0000, 0.0000, 0.0000)
            ( 0.0000, -0.0000, 0.0000, 0.0000)
            (-0.0000,  0.0000, 0.0000, 0.0000)
            ( 0.0000,  0.0000, 0.0000, 0.0000)&gt;