Bash, <strike>65</strike> 58 bytes  
================

    f(){ echo ${a=$1};while((a));do echo $[a=RANDOM%a];done }

[Try it online!][1]


  [1]:https://tio.run/##S0oszvj/P01Ds1ohNTkjX0GlOtFWxbDWujwjMydVQyNRU9M6JR8qFZ1oG@To5@Lvq5oYCxTNS1Wo/Z@mYGhgYPAfAA

**Older solution**

    f(){ a=$1;while [ $a -ne 0 ];do echo $a;a=$(($RANDOM%$a));done }

(Improved thanks to manatwork)