I am wondering why for creating a min heap using the priority_queue, the std::greater should be used?
std::priority_queue
The C++ heap functions make_heap, push_heap, and pop_heap operate on a max heap, meaning the top element is the maximum when using the default comparator. So, to create a min-heap, you need to use greater instead of less.
I suspect that a max heap is used instead of a min heap is that it is easier to implement with the less operation. In C++, less has the special privilege of being the sort of "default" comparator for all STL algorithms; if you only are going to implement one comparison operation (other than ==), it should be <. This leads to the unfortunate quirk that priority_queue means a max-queue and priority_queue means a min-queue.
Also, certain algorithms like nth_element need a max-heap.