Devil Fruit powers and Haki are both part of One Piece's central powerscaling. However, these two are also antagonistic, given how Haki is the only attack that could directly affect a Devil Fruit user. The reason behind this is unknown and could involve a deep relationship with a Devil Fruit user's ultimate enemy, the ocean.
Devil Fruit users are weak to the ocean, not only because they cannot swim but also because their powers get weakened inside water. This could be due to Haki, given the relationship Eiichiro Oda developed between these power scalings. This Haki inside the ocean might also confirm the most popular theory regarding Imu's Devil Fruit powers.
Disclaimer: This article expresses the author's opinion.
One Piece: Exploring the relationship between Devil Fruit powers and Haki

Devil Fruits are abnormally shaped fruits that could give anyone supernatural powers. These supernatural powers are divided into three types based on the type of powers granted: Logia, Zoan, and Paramecia. Out of all these, the Logia type might be the hardest to deal with, as the bodies of these Devil Fruit users are immune to physical attacks.
This is where Haki comes in; Haki is the physical manifestation of a person's spiritual energy (will). Among all the attacks in One Piece, Haki is the most effective way of hurting a Devil Fruit user. Haki is also divided into three types: Observation, Armament, and Conqueror.

As fans might already expect, the relationship between these two could be more than just because of their status as One Piece's powerscaling. Given how Haki might be the only attack that opposes Devil Fruit powers, the former could also be related to the latter's arch-nemesis, the ocean.
In exchange for obtaining supernatural powers, Devil Fruit users lose the ability to swim. Moreover, these users are also weak to water and the sea stone, which emits the same energy as the ocean. The "seastone" in this might be of key importance as it emits the same "energy" as an ocean, hinting that the ocean might also have energy.

This energy might be a "will," just like Haki, but the ocean doesn't have a will of its own. This could indicate that the source of the ocean's energy might be from another source, a user whose Haki is so strong that it covers the entire ocean. This would highlight a popular theory regarding the World Government leader, Imu.
Imu is speculated to have the Umi-Umi Devil Fruit, giving them the power to control ocean bodies. Given the Devil Fruit, Imu might have also spread their Haki around all the water bodies in the Grand Line, creating a force that forbade everyone to use their Devil Fruit powers.
Final thoughts
Take this theory with a huge grain of salt, given how it relates to two of One Piece's biggest elements. While this explanation does overlap with a popular theory, it might still be unbelievable to some fans because Imu's Devil Fruit theory is entirely theoretical. So, take this theory just as a form of entertainment.
Related Links
- Did Gol D. Roger have a Devil Fruit in One Piece? His powers and abilities, explained
- Every One Piece Devil Fruit eaten by an inanimate object
- Latest One Piece spoilers finally reveal Sommers and Killingham's devil fruits