Did you look at the documentation for AdjacencyMatrix in the help system and click on the little triangle next to Details.
That is hiding: The vertices Subscript[v, i] are assumed to be in the order given by VertexList[g].
For your graph I get
In[8]:= VertexList[g]
Out[8]= {1, 7, 2, 6, 3, 5, 4}
I think that explains the result you are getting.
Helpful tip: Always click on Details, sometimes called Details and Options, but always click on that and read the contents.