The diagram frame automatically adjusts its borders to cover all the diagram elements. The frame is rendered as a rectangle with a caption in the top left corner. The caption is displayed within a box with snipped right bottom corner. The caption includes a chosen diagram type and its name.
You can enable displaying the diagram frame using the Properties dialog - you can open it via Ribbon/Diagram tab/Editing group/Diagram Properties...
In the Diagram Properties dialog, switch to Frame tab and click on Show frame.
If you rename the diagram frame in the diagram editor, it also changes the name of the diagram.
The diagram frames are especially useful in exported or printed versions of diagrams to label them with their names and emphasize their borders.