I think it's a combination of factors for both of them, with a fair bit of crossover for both of them.
1. Overall aesthetic. The relatively plain hand to hand combatant/gunner are both aesthetics that don't really appeal to the sort of audience that FFXIV draws (IE, the JRPG fans/Anime Crowd). What that sort of player looks for in a job like monk would be Super Saiyan level impacts with every blow and kamehamehas, and Monk only does the latter every 30 seconds. Machinist with Stormblood certainly became more anime in its aesthetic with the heated shots, and I think that does show. A lot of the times people will sing the praises of Machinist's Stormblood animations even if they don't main it (myself included).
2. Barrier to entry. Both Monk and Machinist have a harder time leveling to 70 than other jobs. On Monk, soloing is a pain in the ass because of positionals, and Greased Lightning upkeep takes a bit of practice to become intuitive so losing it is very common while you're learning the job (especially if FFXIV is your first MMO as it was for me). Solo instances that would easier on other jobs are more difficult on Monk because of this. Machinist has a similar issue, except it's baked into the job design rather than the learning curve. Playing machinist from level 30-64 sucks. You get a gauge at level 52 you can't interact with for 12 levels, all of your skills including the signature Wildfire lack impact, TP drain in AOE is substantial for very low returns, with Spread Shot having one of the lowest Potencies of any AOE in the game (even if the Bishop Turret makes up for this, that damage is 'Invisible' to the average player since it comes from a pet). In both jobs cases, it just takes a long amount of play time before it starts feeling satisfying.
3. Top end jank. Both Machinist and Monk don't feel the best at the level cap. Monk of course has the much maligned Riddle of Fire as a critical action, cutting GCD recast in exchange for more power in a trade-off that has proved about as popular as Wanderer's Minuet's cast times did in Heavensward. After having one of the biggest penalties being the loss of a Haste for 68 levels, making it required for optimal play just feels bad. Machinist is even worse, having one of the stiffest, jankiest rotations in the game. Flamethrower for exactly 2 Server ticks, Overheat and immediately go into 10 seconds of intense GCD spam where a failure to cram 6 into those 10 seconds causes a substantial damage loss, and the reward for perfect execution is still less than other massively hitting skills like Midare Setsugekka...then go for 50 seconds of 1-1-1-2-1-1-2-3ing. Neither is satisfying for the majority of players.