Villages are disabled in the ocean, however this can happen when the starting point is in another biome (like an island nearby) and the village spawns entirely on water as a result.
Although it is not intended behaviour I would not call this a bug since it happens in vanilla.