If MATLAB can generate ground truth for user data, then what is the need for segmentation techniques?. As segmentation masks results are compared with ground truth.??
Ground truth is the golden standard used for segmentation, carefully and manually (most of the time) done individually by experts. Therefore the results you obtain using MATLAB can never be considered as ground truth. Better to name it a segmentation map. For ideal cases, the segmentation map should be very close or exactly similar to the ground truth, but we know that ideal things are rare. I hope you have your answer.
If we limit your question to segmentation applications based on supervised learning, tools provided be MATLB such as the "Ground Truth Labeler app" can help you automate the ground truth labeling process to some extent, but they typically still require the input of the human expert.
For example, unsupervised clustering algorithms may be used to segment objects in an image based on texture or shape etc. but an expert would need to guide the algorithm into segmenting the desired regions/objects and label what each object is.
Pre-trained networks can also be used as a starting point for labeling data for new applications. For example, you can use a generic segmentation network that is trained to segment cars in images, but you might wish to change the segmentation style to be more or less aggressive in including edges, so you use the output of the generic network as a starting point and manually modify it instead of labeling the ground truth from scratch.
As MATLAB is used to label the data that means we are creating a dataset for supervised learning. if we have to extract the same labels with the help of unsupervised learning then Segmentation techniques are required.