Warhammer 40k started as a skirmish wargame by games workshop back in the eighties as space going version of their warhammer fantasy battle game. It has drawn on a lot of influences and particularly in the early days had a lot of in-jokes and the developers pinched bits from their favourite films, books etc. Space Marines draw heavily on Robert Heinleins Starship Troopers and earlier material. There has also been a certain steampunk element to it. The marine tanks draw heavily on WWI tanks for their influence and the multi-turreted tanks between the wars.
Nowadays there are films, computer games and books based on the system.