It's definitely intentional, but it's funny anyway. That's why it works. If the humor in something is based on it being unexpected or unusual, finding out that it was all set up in the first place can ruin the humor. Here, it works because the picture is still funny, and the captions add to that.