Use of bubble sort and selection sort

Why do we use bubble sort or selection sort when we can easily use the “sort()” function?

To understand what algorithm is implemented in the inbuilt sort() function and to understand why that particular method is used.