How does DFS produce MST and All pairs shortest paths in unweighted graphs?
There are two claims here.


  For an unweighted graph, DFS traversal of the graph produces the minimum spanning tree.


This is true; in unweighted graphs, every spanning tree is minimal since they all have the same number of edges, $n-1$.

A nitpick I'd have is "the"; they should write "a minimum spanning tree".


  For an unweighted graph, DFS traversal of the graph produces the all pair shortest path tree.


This is false, it doesn't even produce a single-source shortest path tree. See here.

In general, an APSP tree may not even exist. There are $n(n-1)$ shortest paths to encode, and it would be quite the coincidence if they shared only $n-1$ edges. Which can happen, e.g. in acyclic graphs, but it is certainly not always true. I'll leave it to you to come up with a small counter example.