You'll have to ask the early church fathers this one; for THEY did all the research into which writings would be considered 'scripture'.
And since they are not available...? Some thought it was the work of Paul, but, in fact, it is uncertain who did write it. It sounds nothing like Paul.