This phrase is used to indicate that you don’t have to start a task by the last step to reach the goal you want to achieve. In the literal sense of the phrase, if we want to build a house, it does not make sense to start from the roof, we will have to build from the bottom up. In the same way, each task has a more or less logical order.
When we tell someone who is “starting the house from the roof”we’re telling him that he is starting an activity that is already a bad entry.