I was also surprised to learn that HN allowed this. Even more surprising is the fact that sometimes it doesn't allow to re-post posts that are months old. I wish it was more clearly documented in the FAQ.
https://news.ycombinator.com/newsfaq.html
This is what's going on. The previous submission didn't get any attention (votes, discussion) so the repost was allowed after a certain time threshold (about 8 hours).